Re: With API function, VB freezes up

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Eric (anonymous_at_internet.com)
Date: 12/16/04


Date: Thu, 16 Dec 2004 09:02:42 -0500

I'm new to VB myself and trying to figure out how to code it. It seems the
help section on the Microsoft site likes to put everything in VB.net or C
for examples, and I'm using VB 6.0. It seems Microsoft doesn't like this
regular VB and they're trying their best not to support it. I'm trying to
figure out how to set the Windows default for a printer to landscape. I
think this can be done with APIs, but the help doesn't give any examples for
regular VB so figuring out syntax is a chore.

As Bob suggested, you may get better help figuring out API stuff in the
microsoft.public.vb.winapi newsgroup.

"Tom_OM" <dontspamme@junkmailstinks.com> wrote in message
news:bc62s0lvr0jscjru0q960p1dq6m5rsc3c1@4ax.com...
> Thanks for your very thorough answer to my questions. It's
> appreciated. This gives me a head start on my goal of learning more
> about the API. Up to now I've only been able to use the API if I find
> a tutorial on a function that spells out every step (like as the ones
> on your site). I haven't been able to just look up an API function
> and figure out for myself how to use it.
>
> I've recently purchased a couple of tutorial books on the API (one by
> Steven Roman and the other by Jason Bock) that should help me on my
> quest for a better understanding of that topic. I have the Dan
> Appleman book that I thought was a bargain, but it turned out to be a
> really out-of-date one, the one on VB 4.0, loaded with info I won't
> use like Win 16 API functions. I should probably replace that thing
> with the VB 6 edition.
>
> Oh, yes, and that shutting off that Auto Syntax Check is a gem! That
> feature has annoyed me for a long time. I didn't know you could shut
> it off. I've done the "require variable declaration" thing since I
> first started with VB, and thank goodness I did. Recently went
> through a VB project to make sure every variable had a unique name.
> For instance, I didn't want to have a local variable named
> "blnTextChanged" and a form-level and/or global with the same name.
> Since I knew every variable was declared, all I had to do was do a
> search for "Dim blnTextChanged, " "Private blnTextChanged," and
> "Public blnTextChanged" to find out what I needed to know.
>
> Thanx again.
>
> cheers,
> Tom
>
> On Wed, 15 Dec 2004 23:09:54 -0500, "Randy Birch"
> <rgb_removethis@mvps.org> wrote:
>
> >That last paragraph needs a bit more info ... Because you've injected
your
> >windowproc to receive the messages, something has to be done with them.
>
> *********************************
> Just say NO to VB.NET.
> Try RealBASIC.



Relevant Pages

  • Re: With API function, VB freezes up
    ... Up to now I've only been able to use the API if I find ... I haven't been able to just look up an API function ... I've recently purchased a couple of tutorial books on the API (one by ... I've done the "require variable declaration" thing since I ...
    (microsoft.public.vb.general.discussion)
  • Re: szPname As String * MAXPNAMELEN (How to declare)
    ... I am using GlobalAlloc API to allocate memeory for structure "MIXERCONTROL" ... And then I used following API function to get the mixer control iformation. ... >> Public szShortName As String ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Interview question - filestream
    ... > than some other technique such as a shell api call? ... that I *would* use a file stream to move a file. ... Using the API, you have ... One reason might be that the API function ...
    (borland.public.delphi.language.objectpascal)
  • Re: Getting extended error information for PlaySound
    ... > I've seen GetLastError work in VB, it only seems to depend on the API ... it probably wasn't an error value for an API function that you called. ...
    (microsoft.public.vb.winapi)
  • Re: Getting Clipboard data
    ... Does the usage of any api function ... exist in the host language. ... As far as I know the use of the Windows API with VB is identical as its use with VBA. ...
    (microsoft.public.vb.winapi)