473,385 Members | 1,973 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Sub Main() refusing to work

This is probably the most silly question asked here but I just can't figure
it out.

In VB6 letting Sub Main() be the app's startup directory was real easy under
project properties.

In VB.Net however I don't see such an option, all I see is which form I want
the program to start in.

I've added a Sub Main() into forms, modules, and classes (using the shared
parameter) but I just can't
get project properties to let me choose it as the startup sub. It's always
in some form_load it wants
to startup.

Why?

Adam
Apr 10 '06 #1
16 1451
Adam Honek wrote:
This is probably the most silly question asked here but I just can't figure
it out.

In VB6 letting Sub Main() be the app's startup directory was real easy under
project properties.

In VB.Net however I don't see such an option, all I see is which form I want
the program to start in.

I've added a Sub Main() into forms, modules, and classes (using the shared
parameter) but I just can't
get project properties to let me choose it as the startup sub. It's always
in some form_load it wants
to startup.

Why?

Adam

Show us the code you use to make the the module sub main. It should
show up as Main in the drop down.

Chris
Apr 10 '06 #2
Al
In Project Properties there is a check box Enable Application Framework. If
it's checked then there is no Sub main option. If you uncheck it then Sub
Main option appears in the list of startup objects.
You create Sub Main in a module and it works. At least I did what I
described.

Al

"Adam Honek" <Ad*******@Webmaster2001.freeserve.co.uk> wrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
This is probably the most silly question asked here but I just can't
figure it out.

In VB6 letting Sub Main() be the app's startup directory was real easy
under project properties.

In VB.Net however I don't see such an option, all I see is which form I
want the program to start in.

I've added a Sub Main() into forms, modules, and classes (using the shared
parameter) but I just can't
get project properties to let me choose it as the startup sub. It's always
in some form_load it wants
to startup.

Why?

Adam

Apr 10 '06 #3
In a module I did it like this:

Module Module1

Public Sub Main()

End Sub

End Module

Similar in a form or class.

Adam

"Chris" <no@spam.com> wrote in message
news:ez**************@TK2MSFTNGP03.phx.gbl...
Adam Honek wrote:
This is probably the most silly question asked here but I just can't
figure it out.

In VB6 letting Sub Main() be the app's startup directory was real easy
under project properties.

In VB.Net however I don't see such an option, all I see is which form I
want the program to start in.

I've added a Sub Main() into forms, modules, and classes (using the
shared parameter) but I just can't
get project properties to let me choose it as the startup sub. It's
always in some form_load it wants
to startup.

Why?

Adam

Show us the code you use to make the the module sub main. It should show
up as Main in the drop down.

Chris

Apr 10 '06 #4
It doesn't like it when I turn off the framework option.

Just loads the form and then exits the program.

Public Sub Main()

Dim NewInstance = New frmMain

NewInstance.show()

End Sub

"Al" <al@newsgroups.com> wrote in message
news:%2***************@TK2MSFTNGP02.phx.gbl...
In Project Properties there is a check box Enable Application Framework.
If it's checked then there is no Sub main option. If you uncheck it then
Sub Main option appears in the list of startup objects.
You create Sub Main in a module and it works. At least I did what I
described.

Al

"Adam Honek" <Ad*******@Webmaster2001.freeserve.co.uk> wrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
This is probably the most silly question asked here but I just can't
figure it out.

In VB6 letting Sub Main() be the app's startup directory was real easy
under project properties.

In VB.Net however I don't see such an option, all I see is which form I
want the program to start in.

I've added a Sub Main() into forms, modules, and classes (using the
shared parameter) but I just can't
get project properties to let me choose it as the startup sub. It's
always in some form_load it wants
to startup.

Why?

Adam


Apr 10 '06 #5
Adam Honek wrote:
It doesn't like it when I turn off the framework option.

Just loads the form and then exits the program.

Public Sub Main()

Dim NewInstance = New frmMain

NewInstance.show()

End Sub

"Al" <al@newsgroups.com> wrote in message
news:%2***************@TK2MSFTNGP02.phx.gbl...
In Project Properties there is a check box Enable Application Framework.
If it's checked then there is no Sub main option. If you uncheck it then
Sub Main option appears in the list of startup objects.
You create Sub Main in a module and it works. At least I did what I
described.

Al

"Adam Honek" <Ad*******@Webmaster2001.freeserve.co.uk> wrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl.. .
This is probably the most silly question asked here but I just can't
figure it out.

In VB6 letting Sub Main() be the app's startup directory was real easy
under project properties.

In VB.Net however I don't see such an option, all I see is which form I
want the program to start in.

I've added a Sub Main() into forms, modules, and classes (using the
shared parameter) but I just can't
get project properties to let me choose it as the startup sub. It's
always in some form_load it wants
to startup.

Why?

Adam




do ShowDialog not Show

Chris
Apr 11 '06 #6
Al
I have Sub Main in a module:
Sub Main()

objConn = New SqlConnection

'objConn.ConnectionString = "Data Source=DELLNEW;Initial Catalog=SRSNew;User
ID=administrator;Password=developer4242;"

objConn.ConnectionString = "Data Source=DELL205;Initial
Catalog=SRSNew;Integrated Security=True"

objConn.Open()

Application.Run(New MDIMain)

End Sub

I open SQL Connection and start MDI form. Everything works fine.
You are trying to show the form, not to start the application. This is the
reason why it doesn't work I think.

"Adam Honek" <Ad*******@Webmaster2001.freeserve.co.uk> wrote in message
news:Ox**************@TK2MSFTNGP03.phx.gbl...
It doesn't like it when I turn off the framework option.

Just loads the form and then exits the program.

Public Sub Main()

Dim NewInstance = New frmMain

NewInstance.show()

End Sub

"Al" <al@newsgroups.com> wrote in message
news:%2***************@TK2MSFTNGP02.phx.gbl...
In Project Properties there is a check box Enable Application Framework.
If it's checked then there is no Sub main option. If you uncheck it then
Sub Main option appears in the list of startup objects.
You create Sub Main in a module and it works. At least I did what I
described.

Al

"Adam Honek" <Ad*******@Webmaster2001.freeserve.co.uk> wrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
This is probably the most silly question asked here but I just can't
figure it out.

In VB6 letting Sub Main() be the app's startup directory was real easy
under project properties.

In VB.Net however I don't see such an option, all I see is which form I
want the program to start in.

I've added a Sub Main() into forms, modules, and classes (using the
shared parameter) but I just can't
get project properties to let me choose it as the startup sub. It's
always in some form_load it wants
to startup.

Why?

Adam



Apr 11 '06 #7
Thanks, that made it startup without crashing.

Disabling the framework seems to take away functionality within the
controls.

For example the icons I used in the tree view control suddently get a black
border thus look ugly. Turn on the framekwork and bingo they're nice again.

I think it's to do with disabling Windows XP visual styles.

Adam

"Chris" <no@spam.com> wrote in message
news:eo**************@TK2MSFTNGP02.phx.gbl...
Adam Honek wrote:
It doesn't like it when I turn off the framework option.

Just loads the form and then exits the program.

Public Sub Main()

Dim NewInstance = New frmMain

NewInstance.show()

End Sub

"Al" <al@newsgroups.com> wrote in message
news:%2***************@TK2MSFTNGP02.phx.gbl...
In Project Properties there is a check box Enable Application Framework.
If it's checked then there is no Sub main option. If you uncheck it then
Sub Main option appears in the list of startup objects.
You create Sub Main in a module and it works. At least I did what I
described.

Al

"Adam Honek" <Ad*******@Webmaster2001.freeserve.co.uk> wrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl. ..

This is probably the most silly question asked here but I just can't
figure it out.

In VB6 letting Sub Main() be the app's startup directory was real easy
under project properties.

In VB.Net however I don't see such an option, all I see is which form I
want the program to start in.

I've added a Sub Main() into forms, modules, and classes (using the
shared parameter) but I just can't
get project properties to let me choose it as the startup sub. It's
always in some form_load it wants
to startup.

Why?

Adam



do ShowDialog not Show

Chris

Apr 11 '06 #8
If I do what Chris stated and turn off the framework things go ugly in terms
of visuals.

But I then can use Sub Main().

Is the it then true that MS stopped allowing Sub Main() even when the
framework is turned off? Surely they can't mean
to imply professional coding has the app starting in a form right under
form_load or form_activate?

Adam

"Al" <al@newsgroups.com> wrote in message
news:uK**************@TK2MSFTNGP03.phx.gbl...
I have Sub Main in a module:
Sub Main()

objConn = New SqlConnection

'objConn.ConnectionString = "Data Source=DELLNEW;Initial
Catalog=SRSNew;User ID=administrator;Password=developer4242;"

objConn.ConnectionString = "Data Source=DELL205;Initial
Catalog=SRSNew;Integrated Security=True"

objConn.Open()

Application.Run(New MDIMain)

End Sub

I open SQL Connection and start MDI form. Everything works fine.
You are trying to show the form, not to start the application. This is the
reason why it doesn't work I think.

"Adam Honek" <Ad*******@Webmaster2001.freeserve.co.uk> wrote in message
news:Ox**************@TK2MSFTNGP03.phx.gbl...
It doesn't like it when I turn off the framework option.

Just loads the form and then exits the program.

Public Sub Main()

Dim NewInstance = New frmMain

NewInstance.show()

End Sub

"Al" <al@newsgroups.com> wrote in message
news:%2***************@TK2MSFTNGP02.phx.gbl...
In Project Properties there is a check box Enable Application Framework.
If it's checked then there is no Sub main option. If you uncheck it then
Sub Main option appears in the list of startup objects.
You create Sub Main in a module and it works. At least I did what I
described.

Al

"Adam Honek" <Ad*******@Webmaster2001.freeserve.co.uk> wrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
This is probably the most silly question asked here but I just can't
figure it out.

In VB6 letting Sub Main() be the app's startup directory was real easy
under project properties.

In VB.Net however I don't see such an option, all I see is which form I
want the program to start in.

I've added a Sub Main() into forms, modules, and classes (using the
shared parameter) but I just can't
get project properties to let me choose it as the startup sub. It's
always in some form_load it wants
to startup.

Why?

Adam



Apr 11 '06 #9
Al
Adam,
I have a very long experience with VB6, with VB2005 I'm just starting. I did
already several nice looking forms with Infragistics and did not notice any
visual problem.
I cannot be sure that turning on or off Enable Application Framework may
affect visual stuff. Maybe it's related somehow, but as I said I do not see
problems yet.
I tried to attached a couple of screen shots , but they are not accepted by
the server (sizes 50 K and 90 K - to make them smaller to make them look
worse).

Al
"Adam Honek" <Ad*******@Webmaster2001.freeserve.co.uk> wrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
If I do what Chris stated and turn off the framework things go ugly in
terms of visuals.

But I then can use Sub Main().

Is the it then true that MS stopped allowing Sub Main() even when the
framework is turned off? Surely they can't mean
to imply professional coding has the app starting in a form right under
form_load or form_activate?

Adam

"Al" <al@newsgroups.com> wrote in message
news:uK**************@TK2MSFTNGP03.phx.gbl...
I have Sub Main in a module:
Sub Main()

objConn = New SqlConnection

'objConn.ConnectionString = "Data Source=DELLNEW;Initial
Catalog=SRSNew;User ID=administrator;Password=developer4242;"

objConn.ConnectionString = "Data Source=DELL205;Initial
Catalog=SRSNew;Integrated Security=True"

objConn.Open()

Application.Run(New MDIMain)

End Sub

I open SQL Connection and start MDI form. Everything works fine.
You are trying to show the form, not to start the application. This is
the reason why it doesn't work I think.

"Adam Honek" <Ad*******@Webmaster2001.freeserve.co.uk> wrote in message
news:Ox**************@TK2MSFTNGP03.phx.gbl...
It doesn't like it when I turn off the framework option.

Just loads the form and then exits the program.

Public Sub Main()

Dim NewInstance = New frmMain

NewInstance.show()

End Sub

"Al" <al@newsgroups.com> wrote in message
news:%2***************@TK2MSFTNGP02.phx.gbl...
In Project Properties there is a check box Enable Application
Framework. If it's checked then there is no Sub main option. If you
uncheck it then Sub Main option appears in the list of startup objects.
You create Sub Main in a module and it works. At least I did what I
described.

Al

"Adam Honek" <Ad*******@Webmaster2001.freeserve.co.uk> wrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
> This is probably the most silly question asked here but I just can't
> figure it out.
>
> In VB6 letting Sub Main() be the app's startup directory was real easy
> under project properties.
>
> In VB.Net however I don't see such an option, all I see is which form
> I want the program to start in.
>
> I've added a Sub Main() into forms, modules, and classes (using the
> shared parameter) but I just can't
> get project properties to let me choose it as the startup sub. It's
> always in some form_load it wants
> to startup.
>
> Why?
>
> Adam
>



Apr 11 '06 #10
Those are nice looking screens indeed.

In that case it must not affect all controls (the visuals going downhill)
because on mine I have a menu strip
and tree view amongst other graphical control and both suffered visual loss
when turning off the framework.

On one side .NET seems easier than VB6 but on the other there's many places
to just ask ?????'s
about even simple things.

At least we can still use the Win32API if unsure and I'm sure it's faster
than this freamework wrapper
interpreted code anyway.

Adam
"Al" <al@newsgroups.com> wrote in message
news:eX**************@TK2MSFTNGP03.phx.gbl...
Adam,
I have a very long experience with VB6, with VB2005 I'm just starting. I
did
already several nice looking forms with Infragistics and did not notice
any
visual problem.
I cannot be sure that turning on or off Enable Application Framework may
affect visual stuff. Maybe it's related somehow, but as I said I do not
see
problems yet.
I tried to attached a couple of screen shots , but they are not accepted
by the server (sizes 50 K and 90 K - to make them smaller to make them
look worse).

Al
"Adam Honek" <Ad*******@Webmaster2001.freeserve.co.uk> wrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
If I do what Chris stated and turn off the framework things go ugly in
terms of visuals.

But I then can use Sub Main().

Is the it then true that MS stopped allowing Sub Main() even when the
framework is turned off? Surely they can't mean
to imply professional coding has the app starting in a form right under
form_load or form_activate?

Adam

"Al" <al@newsgroups.com> wrote in message
news:uK**************@TK2MSFTNGP03.phx.gbl...
I have Sub Main in a module:
Sub Main()

objConn = New SqlConnection

'objConn.ConnectionString = "Data Source=DELLNEW;Initial
Catalog=SRSNew;User ID=administrator;Password=developer4242;"

objConn.ConnectionString = "Data Source=DELL205;Initial
Catalog=SRSNew;Integrated Security=True"

objConn.Open()

Application.Run(New MDIMain)

End Sub

I open SQL Connection and start MDI form. Everything works fine.
You are trying to show the form, not to start the application. This is
the reason why it doesn't work I think.

"Adam Honek" <Ad*******@Webmaster2001.freeserve.co.uk> wrote in message
news:Ox**************@TK2MSFTNGP03.phx.gbl...
It doesn't like it when I turn off the framework option.

Just loads the form and then exits the program.

Public Sub Main()

Dim NewInstance = New frmMain

NewInstance.show()

End Sub

"Al" <al@newsgroups.com> wrote in message
news:%2***************@TK2MSFTNGP02.phx.gbl...
> In Project Properties there is a check box Enable Application
> Framework. If it's checked then there is no Sub main option. If you
> uncheck it then Sub Main option appears in the list of startup
> objects.
> You create Sub Main in a module and it works. At least I did what I
> described.
>
> Al
>
> "Adam Honek" <Ad*******@Webmaster2001.freeserve.co.uk> wrote in
> message news:%2****************@TK2MSFTNGP02.phx.gbl...
>> This is probably the most silly question asked here but I just can't
>> figure it out.
>>
>> In VB6 letting Sub Main() be the app's startup directory was real
>> easy under project properties.
>>
>> In VB.Net however I don't see such an option, all I see is which form
>> I want the program to start in.
>>
>> I've added a Sub Main() into forms, modules, and classes (using the
>> shared parameter) but I just can't
>> get project properties to let me choose it as the startup sub. It's
>> always in some form_load it wants
>> to startup.
>>
>> Why?
>>
>> Adam
>>
>
>



Apr 11 '06 #11
Al
I hate XP style myself and even did not try to run under XP desktop
settings. After your answer I tryed and saw that many controls changed their
appearance, but they still look fine. Just different than they are under
Classic settings. Now I need to check all controls, because my users tastes
are not the same as mine, so they may use XP settings. So far I did not find
any problem.

Al

"Adam Honek" <Ad*******@Webmaster2001.freeserve.co.uk> wrote in message
news:OM**************@TK2MSFTNGP05.phx.gbl...
Those are nice looking screens indeed.

In that case it must not affect all controls (the visuals going downhill)
because on mine I have a menu strip
and tree view amongst other graphical control and both suffered visual
loss when turning off the framework.

On one side .NET seems easier than VB6 but on the other there's many
places to just ask ?????'s
about even simple things.

At least we can still use the Win32API if unsure and I'm sure it's faster
than this freamework wrapper
interpreted code anyway.

Adam
"Al" <al@newsgroups.com> wrote in message
news:eX**************@TK2MSFTNGP03.phx.gbl...
Adam,
I have a very long experience with VB6, with VB2005 I'm just starting. I
did
already several nice looking forms with Infragistics and did not notice
any
visual problem.
I cannot be sure that turning on or off Enable Application Framework may
affect visual stuff. Maybe it's related somehow, but as I said I do not
see
problems yet.
I tried to attached a couple of screen shots , but they are not accepted
by the server (sizes 50 K and 90 K - to make them smaller to make them
look worse).

Al
"Adam Honek" <Ad*******@Webmaster2001.freeserve.co.uk> wrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
If I do what Chris stated and turn off the framework things go ugly in
terms of visuals.

But I then can use Sub Main().

Is the it then true that MS stopped allowing Sub Main() even when the
framework is turned off? Surely they can't mean
to imply professional coding has the app starting in a form right under
form_load or form_activate?

Adam

"Al" <al@newsgroups.com> wrote in message
news:uK**************@TK2MSFTNGP03.phx.gbl...
I have Sub Main in a module:
Sub Main()

objConn = New SqlConnection

'objConn.ConnectionString = "Data Source=DELLNEW;Initial
Catalog=SRSNew;User ID=administrator;Password=developer4242;"

objConn.ConnectionString = "Data Source=DELL205;Initial
Catalog=SRSNew;Integrated Security=True"

objConn.Open()

Application.Run(New MDIMain)

End Sub

I open SQL Connection and start MDI form. Everything works fine.
You are trying to show the form, not to start the application. This is
the reason why it doesn't work I think.

"Adam Honek" <Ad*******@Webmaster2001.freeserve.co.uk> wrote in message
news:Ox**************@TK2MSFTNGP03.phx.gbl...
> It doesn't like it when I turn off the framework option.
>
> Just loads the form and then exits the program.
>
> Public Sub Main()
>
> Dim NewInstance = New frmMain
>
> NewInstance.show()
>
> End Sub
>
>
>
> "Al" <al@newsgroups.com> wrote in message
> news:%2***************@TK2MSFTNGP02.phx.gbl...
>> In Project Properties there is a check box Enable Application
>> Framework. If it's checked then there is no Sub main option. If you
>> uncheck it then Sub Main option appears in the list of startup
>> objects.
>> You create Sub Main in a module and it works. At least I did what I
>> described.
>>
>> Al
>>
>> "Adam Honek" <Ad*******@Webmaster2001.freeserve.co.uk> wrote in
>> message news:%2****************@TK2MSFTNGP02.phx.gbl...
>>> This is probably the most silly question asked here but I just can't
>>> figure it out.
>>>
>>> In VB6 letting Sub Main() be the app's startup directory was real
>>> easy under project properties.
>>>
>>> In VB.Net however I don't see such an option, all I see is which
>>> form I want the program to start in.
>>>
>>> I've added a Sub Main() into forms, modules, and classes (using the
>>> shared parameter) but I just can't
>>> get project properties to let me choose it as the startup sub. It's
>>> always in some form_load it wants
>>> to startup.
>>>
>>> Why?
>>>
>>> Adam
>>>
>>
>>
>
>



Apr 11 '06 #12
On Tue, 11 Apr 2006 01:27:27 +0100, "Adam Honek"
<Ad*******@Webmaster2001.freeserve.co.uk> wrote:
It doesn't like it when I turn off the framework option.

Just loads the form and then exits the program.

Public Sub Main()

Dim NewInstance = New frmMain

NewInstance.show()

End Sub


If that's the only code in your Sub Main and frmMain is your startup
object, then there is no logical reason to use a SubMain.
If there is other code, you might want to look at possibly using
Sub MyApplication_Startup in the Application Designer>

Gene


"Al" <al@newsgroups.com> wrote in message
news:%2***************@TK2MSFTNGP02.phx.gbl...
In Project Properties there is a check box Enable Application Framework.
If it's checked then there is no Sub main option. If you uncheck it then
Sub Main option appears in the list of startup objects.
You create Sub Main in a module and it works. At least I did what I
described.

Al

"Adam Honek" <Ad*******@Webmaster2001.freeserve.co.uk> wrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
This is probably the most silly question asked here but I just can't
figure it out.

In VB6 letting Sub Main() be the app's startup directory was real easy
under project properties.

In VB.Net however I don't see such an option, all I see is which form I
want the program to start in.

I've added a Sub Main() into forms, modules, and classes (using the
shared parameter) but I just can't
get project properties to let me choose it as the startup sub. It's
always in some form_load it wants
to startup.

Why?

Adam


Apr 11 '06 #13
Adam,

One of the thousand messages Armin, Herfried and Jay have written about this
in this newsgroup.

It is an old message from Herfried but therefore probably very good in your
case.

http://groups.google.com/group/micro...37ecbe95e32ad1

If you want to read more about it, than check for the by them often used
word messagepump.

I don't use it in form applications the inbuild is fine enough for me.

I hope this helps,

Cor
"Adam Honek" <Ad*******@Webmaster2001.freeserve.co.uk> schreef in bericht
news:%2****************@TK2MSFTNGP02.phx.gbl...
This is probably the most silly question asked here but I just can't
figure it out.

In VB6 letting Sub Main() be the app's startup directory was real easy
under project properties.

In VB.Net however I don't see such an option, all I see is which form I
want the program to start in.

I've added a Sub Main() into forms, modules, and classes (using the shared
parameter) but I just can't
get project properties to let me choose it as the startup sub. It's always
in some form_load it wants
to startup.

Why?

Adam

Apr 11 '06 #14
Try adding:

Application.EnableVisualStyles

in your subMain module.

Apr 11 '06 #15
Hmmm, that's how I expect things to work, more how VB6 RIP worked. Thanks.

So why the framework? What exactly happens when it's disabled in the
application settings?

The .NET framework it used anyhow is it not?

Maybe MS is trying to tell us there's no point in using Sub Main() anymore,
it's fine to just use a startup forms _load or _activate event?

Adam
"Cor Ligthert [MVP]" <no************@planet.nl> wrote in message
news:OO**************@TK2MSFTNGP04.phx.gbl...
Adam,

One of the thousand messages Armin, Herfried and Jay have written about
this in this newsgroup.

It is an old message from Herfried but therefore probably very good in
your case.

http://groups.google.com/group/micro...37ecbe95e32ad1

If you want to read more about it, than check for the by them often used
word messagepump.

I don't use it in form applications the inbuild is fine enough for me.

I hope this helps,

Cor
"Adam Honek" <Ad*******@Webmaster2001.freeserve.co.uk> schreef in bericht
news:%2****************@TK2MSFTNGP02.phx.gbl...
This is probably the most silly question asked here but I just can't
figure it out.

In VB6 letting Sub Main() be the app's startup directory was real easy
under project properties.

In VB.Net however I don't see such an option, all I see is which form I
want the program to start in.

I've added a Sub Main() into forms, modules, and classes (using the
shared parameter) but I just can't
get project properties to let me choose it as the startup sub. It's
always in some form_load it wants
to startup.

Why?

Adam


Apr 11 '06 #16
I think it must be because the images you're using aren't 32bit hence you
can't
tell the difference in quality.

Even 24bit isn't 32bit quality because of the alpha 8 bit channel despite
both being 16.7m colours.

Adam

"Al" <al@newsgroups.com> wrote in message
news:Ow**************@TK2MSFTNGP04.phx.gbl...
Adam,
I use MenuStrip too, but it looks the same under both settings. I couldn't
mak a screen shot of it.
I did a small image from another couple of controls - Tab and Grid. See
attached.

Al

"Al" <al@newsgroups.com> wrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
I hate XP style myself and even did not try to run under XP desktop
settings. After your answer I tryed and saw that many controls changed
their
appearance, but they still look fine. Just different than they are under
Classic settings. Now I need to check all controls, because my users
tastes
are not the same as mine, so they may use XP settings. So far I did not
find
any problem.

Al

"Adam Honek" <Ad*******@Webmaster2001.freeserve.co.uk> wrote in message
news:OM**************@TK2MSFTNGP05.phx.gbl...
Those are nice looking screens indeed.

In that case it must not affect all controls (the visuals going
downhill)
because on mine I have a menu strip
and tree view amongst other graphical control and both suffered visual
loss when turning off the framework.

On one side .NET seems easier than VB6 but on the other there's many
places to just ask ?????'s
about even simple things.

At least we can still use the Win32API if unsure and I'm sure it's
faster
than this freamework wrapper
interpreted code anyway.

Adam
"Al" <al@newsgroups.com> wrote in message
news:eX**************@TK2MSFTNGP03.phx.gbl...
Adam,
I have a very long experience with VB6, with VB2005 I'm just starting.
I
did
already several nice looking forms with Infragistics and did not notice
any
visual problem.
I cannot be sure that turning on or off Enable Application Framework
may
affect visual stuff. Maybe it's related somehow, but as I said I do not
see
problems yet.
I tried to attached a couple of screen shots , but they are not
accepted
by the server (sizes 50 K and 90 K - to make them smaller to make them
look worse).

Al
"Adam Honek" <Ad*******@Webmaster2001.freeserve.co.uk> wrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
> If I do what Chris stated and turn off the framework things go ugly in
> terms of visuals.
>
> But I then can use Sub Main().
>
> Is the it then true that MS stopped allowing Sub Main() even when the
> framework is turned off? Surely they can't mean
> to imply professional coding has the app starting in a form right
> under
> form_load or form_activate?
>
> Adam
>
> "Al" <al@newsgroups.com> wrote in message
> news:uK**************@TK2MSFTNGP03.phx.gbl...
>>I have Sub Main in a module:
>> Sub Main()
>>
>> objConn = New SqlConnection
>>
>> 'objConn.ConnectionString = "Data Source=DELLNEW;Initial
>> Catalog=SRSNew;User ID=administrator;Password=developer4242;"
>>
>> objConn.ConnectionString = "Data Source=DELL205;Initial
>> Catalog=SRSNew;Integrated Security=True"
>>
>> objConn.Open()
>>
>> Application.Run(New MDIMain)
>>
>> End Sub
>>
>> I open SQL Connection and start MDI form. Everything works fine.
>> You are trying to show the form, not to start the application. This
>> is
>> the reason why it doesn't work I think.
>>
>> "Adam Honek" <Ad*******@Webmaster2001.freeserve.co.uk> wrote in
>> message
>> news:Ox**************@TK2MSFTNGP03.phx.gbl...
>>> It doesn't like it when I turn off the framework option.
>>>
>>> Just loads the form and then exits the program.
>>>
>>> Public Sub Main()
>>>
>>> Dim NewInstance = New frmMain
>>>
>>> NewInstance.show()
>>>
>>> End Sub
>>>
>>>
>>>
>>> "Al" <al@newsgroups.com> wrote in message
>>> news:%2***************@TK2MSFTNGP02.phx.gbl...
>>>> In Project Properties there is a check box Enable Application
>>>> Framework. If it's checked then there is no Sub main option. If you
>>>> uncheck it then Sub Main option appears in the list of startup
>>>> objects.
>>>> You create Sub Main in a module and it works. At least I did what I
>>>> described.
>>>>
>>>> Al
>>>>
>>>> "Adam Honek" <Ad*******@Webmaster2001.freeserve.co.uk> wrote in
>>>> message news:%2****************@TK2MSFTNGP02.phx.gbl...
>>>>> This is probably the most silly question asked here but I just
>>>>> can't
>>>>> figure it out.
>>>>>
>>>>> In VB6 letting Sub Main() be the app's startup directory was real
>>>>> easy under project properties.
>>>>>
>>>>> In VB.Net however I don't see such an option, all I see is which
>>>>> form I want the program to start in.
>>>>>
>>>>> I've added a Sub Main() into forms, modules, and classes (using
>>>>> the
>>>>> shared parameter) but I just can't
>>>>> get project properties to let me choose it as the startup sub.
>>>>> It's
>>>>> always in some form_load it wants
>>>>> to startup.
>>>>>
>>>>> Why?
>>>>>
>>>>> Adam
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>



Apr 12 '06 #17

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

45
by: Steven T. Hatton | last post by:
This is a purely *hypothetical* question. That means, it's /pretend/, CP. ;-) If you were forced at gunpoint to put all your code in classes, rather than in namespace scope (obviously classes...
4
by: Dave Boyd | last post by:
Hi, I have two very similar forms each with a subform. The main form gets a few fields from the user and passes this back to a query that the subform is bound to. The requery is done when the...
1
by: shaqattack1992-newsgroups | last post by:
I know this is kind of a weird question, but is there anyway to give a subreport control of a main report? I posted my situation earlier about having drawings print out after a group. I have a...
3
by: John Crowley | last post by:
I've run into a problem where drop down lists are refusing to data bind with the following error on the DataBind() call Specified argument was out of the range of valid values. Parameter name:...
25
by: Christian Christmann | last post by:
Hi, the ANSI-C 99 standard specifies that the main function has "int" as return type. However, there are still lots of people declaring "void" as main return type. Did previous ANSI-C...
1
by: Rob | last post by:
Windows XP's "on-screen keyboard" accessibility tool accepts clicks on a virtual keyboard and sends them to whatever app has the input focus. But it does one neat thing I can't reproduce: it does...
0
by: rabbit | last post by:
Hello, I am really stuck with the following problem and I have tried almost all options I could find on Google to no avail. I recently installed the rpm version of MySQL server 5.0.26 on Fedora...
2
by: Tarun Mistry | last post by:
Hi guys, this is really driving me crazy, any help appreciated. using ASP.NET 2.0 in VS 2005 and reviewing with IE7. I have some fields with validators attached to them. If I drag a summary...
2
by: Wingot | last post by:
Hey, I have a view to a database that I have created for Client Maintenance. It has a number of fields, but the important ones are Medical Condition, Bill To, and Country. I have a couple of...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.