Page 3 of 4 <1234>
Topic Options
#171426 - 2006-12-13 01:10 PM Re: KiXforms.Net Learning Series - Windows Registry Run Project 01 - Lesson 01 [Re: Jochen]
Witto Offline
MM club member
*****

Registered: 2004-09-29
Posts: 1828
Loc: Belgium
I used the png to generate the string. Works as a charm.
You also should write an extra line at the end of your function
$String_FormIcon = $System.Bitmap.FromBase64String($String_FormIcon)

Top
#171428 - 2006-12-13 01:20 PM Re: KiXforms.Net Learning Series - Windows Registry Run Project 01 - Lesson 01 [Re: Witto]
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
Nay,

neither this nor the other shows other than the default form icon.
Please don't tell me that this is due to coding on a W2K Prof. box

edit:
Quote:

You also should write an extra line at the end of your function
$String_FormIcon = $System.Bitmap.FromBase64String($String_FormIcon)


Why should I do this ? It makes no sense !


Edited by Jochen (2006-12-13 01:26 PM)
_________________________



Top
#171429 - 2006-12-13 01:24 PM Re: KiXforms.Net Learning Series - Windows Registry Run Project 01 - Lesson 01 [Re: Jochen]
Witto Offline
MM club member
*****

Registered: 2004-09-29
Posts: 1828
Loc: Belgium
Why you should do that. Well, If I don't, I do not get an icon.
I don't know how far I can go posting script, because Benny said
Originally Posted By: Benny96

Do not post solutions until after solution post time is announced.

I cannot believe that W2K is an issue.
Also use the PNG to create the string, not your converted bmp.

Top
#171431 - 2006-12-13 01:48 PM Re: KiXforms.Net Learning Series - Windows Registry Run Project 01 - Lesson 01 [Re: Witto]
Benny69 Offline
Moderator
*****

Registered: 2003-10-29
Posts: 1036
Loc: Lincoln, Ne
I would say, oh wait i did:
Quote:

Collaboration is not allowed until after solution post time is announced.


Jochen,
Form.Icon, KFD will show you the way.
_________________________
Wait don't order yet,... get KiXforms Designer .NET 2.0 (Beta)
KiXforms Designer .NET 2.0 (Beta)

Top
#171432 - 2006-12-13 02:07 PM Re: KiXforms.Net Learning Series - Windows Registry Run Project 01 - Lesson 01 [Re: Benny69]
Gargoyle Offline
MM club member
*****

Registered: 2004-03-09
Posts: 1597
Loc: Valley of the Sun (Arizona, US...
I to had that issue until I read more on the Form.Icon. It was a bit frustrating to say the least.
_________________________
Today is the tomorrow you worried about yesterday.

Top
#171433 - 2006-12-13 02:30 PM Re: KiXforms.Net Learning Series - Windows Registry Run Project 01 - Lesso [Re: Benny69]
Viggen Offline
Starting to like KiXtart

Registered: 2002-03-22
Posts: 110
I'll give this a go...
(as soon as I figure out how to place the button text to the right and the ico to the left) \:\)

Top
#171434 - 2006-12-13 02:52 PM Re: KiXforms.Net Learning Series - Windows Registry Run Project 01 - Lesson 01 [Re: Benny69]
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
The thing that really annoys me is that the code is exactly the same as in Shawns functioning post here. The only difference is the base64 string

edit: btw, I never used any form designer of any kind, and I won't start now \:\)


Edited by Jochen (2006-12-13 03:13 PM)
_________________________



Top
#171435 - 2006-12-13 03:16 PM Re: KiXforms.Net Learning Series - Windows Registry Run Project 01 - Lesson 01 [Re: Jochen]
Witto Offline
MM club member
*****

Registered: 2004-09-29
Posts: 1828
Loc: Belgium
If you would use the KFD and add an icon to a form, you would get an example script that you can use...
Anyway, that is how I did it.

Top
#171436 - 2006-12-13 03:42 PM Re: KiXforms.Net Learning Series - Windows Registry Run Project 01 - Lesson 01 [Re: Witto]
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
lol.
You don't get it, eh?
I have a sample script that works! Just follow the link I posted above and run Shawns sample ... See? it works! Now compare Shawns script to the one I posted... any difference? I'd say the only difference is the base64 string itself.

So it must have something to do either with the size (aspect ratio) of the input bitmap or with something else I am doomed to overlook atm

I am just the type of guy who likes to understand things rather than to accept silver platter solutions from forms designers and stuff ... more fun, you know

maybe Shawns sample strings are converted (real) *.ico files ???


Edited by Jochen (2006-12-13 04:12 PM)
_________________________



Top
#171438 - 2006-12-13 03:57 PM Re: KiXforms.Net Learning Series - Windows Registry Run Project 01 - Lesso [Re: Benny69]
Viggen Offline
Starting to like KiXtart

Registered: 2002-03-22
Posts: 110
Aahhh... *done* \:\)
Top
#171439 - 2006-12-13 04:07 PM Re: KiXforms.Net Learning Series - Windows Registry Run Project 01 - Lesso [Re: Viggen]
Benny69 Offline
Moderator
*****

Registered: 2003-10-29
Posts: 1036
Loc: Lincoln, Ne
Jochen,
Shawn's example does work fine, the problem you are having is that the Base64 string is created from a .ico file.

Shawn's example with the correct Base64 string:
Code:
Break On 

$System = CreateObject("Kixforms.System") 

$Form = $System.Form() 
$Form.Text = "Demo" 
$Form.Icon = $System.Icon.FromBase64String(UserIconString()) 

$Form.Center 
$Form.Show 
While $Form.Visible 
 $= Execute($System.Application.DoEvents) 
Loop 

Exit 0 

Function UserIconString() 
$UserIconString = " 
AAABAAEAEBAQAAAAAAAoAQAAFgAAACgAAAAQAAAAIAAAAAEABAAAAAAAwAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAACAAACAAAAAgIAAgAAAAIAAgACAgAAAgICAAMDAwAAAAP8AAP8AAAD/
/wD/AAAA/wD/AP//AAD///8AAAAAAAAAAAAP/////4iP8A////iAAI/wD///AACQj/AP//8I
8AD/8A///wj/iI/wD///CIAAj/AP//8AAKCP8A///wiAAP/w+IiAAI////DwAACwj///8PCP
8AD////w8I////////AACJmZmZmZkA4ImZmZmZmQAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" 
EndFunction
_________________________
Wait don't order yet,... get KiXforms Designer .NET 2.0 (Beta)
KiXforms Designer .NET 2.0 (Beta)

Top
#171440 - 2006-12-13 04:26 PM Re: KiXforms.Net Learning Series - Windows Registry Run Project 01 - Lesso [Re: Benny69]
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
Yap, that was the conclusion that I came up with in the mean time ...



Will have to experiment with .Ico format this evening when I get to my home boxes which have a bit more than mspaint on it or digging another way around it ... there are other methods than FromBase64String that I have not tried yet.

When did you say the deadline was ?
_________________________



Top
#171443 - 2006-12-13 05:35 PM Re: KiXforms.Net Learning Series - Windows Registry Run Project 01 - Lesso [Re: Jochen]
Benny69 Offline
Moderator
*****

Registered: 2003-10-29
Posts: 1036
Loc: Lincoln, Ne
I have not said yet but I think that Friday morn would be good.
_________________________
Wait don't order yet,... get KiXforms Designer .NET 2.0 (Beta)
KiXforms Designer .NET 2.0 (Beta)

Top
#171451 - 2006-12-13 07:48 PM Re: KiXforms.Net Learning Series - Windows Registry Run Project 01 - Lesso [Re: Benny69]
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11624
Loc: CA
Dang... Friday - LOL - I suppose that is the end of the week

Was here at work till 02:30 and might be late again tonight (new database error reported I might have to fix tonight).

Oh well. I'll "borrow" from the others when they post maybe
 
.

Top
#171454 - 2006-12-13 09:01 PM Re: KiXforms.Net Learning Series - Windows Registry Run Project 01 - Lesso [Re: NTDOC]
pearly Offline
Getting the hang of it
*****

Registered: 2004-02-04
Posts: 92
Uh oh, I completely forgot about this. Will get on it this week. May just have a partial working on form.
Top
#171494 - 2006-12-14 11:06 AM Re: KiXforms.Net Learning Series - Windows Registry Run Project 01 - Lesso [Re: Benny69]
Viggen Offline
Starting to like KiXtart

Registered: 2002-03-22
Posts: 110
Originally Posted By: Benny69
The only Events and Functions you should work on/create is for:
  • 'Exit MenuItem' to exit the form.
  • The minimum size of the form.
  • The 'Form.Icon' - Base64 string.
  • The 'ImageList' - Base64 string.



Is it allowed to add a function to hinder the possibility of setting the splitter to high or to low?
(or is that something for a later lesson?) \:\)

/Viggen

Top
#171497 - 2006-12-14 12:48 PM Re: KiXforms.Net Learning Series - Windows Registry Run Project 01 - Lesso [Re: Viggen]
Benny69 Offline
Moderator
*****

Registered: 2003-10-29
Posts: 1036
Loc: Lincoln, Ne
you may
_________________________
Wait don't order yet,... get KiXforms Designer .NET 2.0 (Beta)
KiXforms Designer .NET 2.0 (Beta)

Top
#171522 - 2006-12-14 07:11 PM Re: KiXforms.Net Learning Series - Windows Registry Run Project 01 - Lesso [Re: Benny69]
Benny69 Offline
Moderator
*****

Registered: 2003-10-29
Posts: 1036
Loc: Lincoln, Ne
You may post your code at 06:00 am GMT Friday Morn.
_________________________
Wait don't order yet,... get KiXforms Designer .NET 2.0 (Beta)
KiXforms Designer .NET 2.0 (Beta)

Top
#171538 - 2006-12-15 01:25 AM Re: KiXforms.Net Learning Series - Windows Registry Run Project 01 - Lesso [Re: Benny69]
Gargoyle Offline
MM club member
*****

Registered: 2004-03-09
Posts: 1597
Loc: Valley of the Sun (Arizona, US...
Oh gee thanks Benny - That is 0100 for me \:\( I should have mine in by 1600 GMT

Edited by Gargoyle (2006-12-15 01:25 AM)
_________________________
Today is the tomorrow you worried about yesterday.

Top
#171539 - 2006-12-15 01:46 AM Re: KiXforms.Net Learning Series - Windows Registry Run Project 01 - Lesso [Re: Gargoyle]
Benny69 Offline
Moderator
*****

Registered: 2003-10-29
Posts: 1036
Loc: Lincoln, Ne
thats fine, i am sure they will trickle in all day, its just a start time.
_________________________
Wait don't order yet,... get KiXforms Designer .NET 2.0 (Beta)
KiXforms Designer .NET 2.0 (Beta)

Top
Page 3 of 4 <1234>


Moderator:  NTDOC, ShaneEP, Mart, Radimus, Glenn Barnas, Jochen, Allen 
Hop to:
Shout Box

Who's Online
0 registered and 542 anonymous users online.
Newest Members
Timothy, Jojo67, MaikSimon, kvn317, kixtarts2025
17874 Registered Users

Generated in 0.058 seconds in which 0.02 seconds were spent on a total of 13 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org