|
Option Explicit
Const FORMAT_MESSAGE_FROM_SYSTEM = &H1000
Private Declare Function FormatMessage Lib "kernel32" Alias _
"FormatMessageA" ( ByVal dwFlags As Long, lpSource As Long, _
ByVal dwMessageId As Long, ByVal dwLanguageId As Long, _
ByVal lpBuffer As String, ByVal nSize As Long, Arguments As Any) _
As Long
Private Function MessageText(lCode As Long) As String
Dim sRtrnCode As String
Dim lRet As Long
sRtrnCode = Space$(256)
lRet = FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, 0&, lCode, 0&, _
sRtrnCode, 256&, 0&)
If lRet >0 Then
MessageText = Left(sRtrnCode, lRet)
Else
MessageText = "Error not found."
End If
End Function
|
|
|
|
|
|
Hi everyone, first let me thank you for reading this post.
Ok, I am making my own set of controls and I would like to be able to group certain properties together. I dont mean the standard <category> tag to put them under the same header, I mean for example, like the font property.
A user can specify the whole fon style for the property by clicking the ellipse button, or they can expand the font section and modify individual parts of the font - like size, style etc.
Does anyone know how to achieve this result with your own custom properties?
thanks for all the support.
|
|
|
|
|
Do you have any idea when i tried to select the table with
Blob field i get the exception say -2147467259 - unspecified error?
rs.Open "Select * from MYTEST", db, adOpenKeyset, adLockOptimistic
I am using VB6
|
|
|
|
|
Update your MDAC to a newer version
|
|
|
|
|
m using 2.8 but still doesn't work
|
|
|
|
|
I have a query in MS access that I want to pass the where clause as a parameter. The way I have it now, it ignores the where clause and it displays every record in the table. How can I rewrite this query?
SELECT MAIN.ID, Languages.Languages, FIRST, STATES.STATE, Category.Category, Specialization.Specialization, Certification.Certification
FROM ((((MAIN LEFT JOIN Languages ON MAIN.Language=Languages.ID) LEFT JOIN StateS ON MAIN.State=StateS.StateID) LEFT JOIN Category ON MAIN.Category=Category.ID) LEFT JOIN Specialization ON MAIN.Specialization=Specialization.ID) LEFT JOIN Certification ON MAIN.Certification=Certification.ID
WHERE @whereCluase
Thanks,
Martin
|
|
|
|
|
If you pass in the where clause, you'll need to build the query as a string, and call the execute method. This is VERY ugly, make sure you need to do it. Also don't forget to protect against injection attacks.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
hi, i made a text editor in VB.NET called Active Text, it can be found here http://users.telenet.be/acnetonline/project/activetext.Exe
My problem is the following:
i want it to work with it's own file extension. So i'll have to make register changes, can someone tell me how and what to write to let the computer know it's text and has to be opened with my program?
thanx
http://www.acnetonline.info
|
|
|
|
|
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vsintro7/html/vbtskaddingdeletingdocumenttypesassociatedfileextensions.asp
|
|
|
|
|
Hi All,
Is it possible to move image files around an ImageList during run time after the ImageList has been populated at design time?
Basically i'm looking for the code syntax for being able to sort image files (*.gif) in an ImageList.
Can this be done using the "index" value of the stored images?
thanks
|
|
|
|
|
There isn't any way to sort an existing ImageList. You can Add images to the end of the ImageList and RemoveAt any index in the list, but you can't "AddAt", "Insert", "Move", or "Swap".
I can see a possible way to do it, but you'd end up extending the existing ImageList class and supplying the code to InsertAt or Swap. The only way I can see supporting this is making an entirely new ImageList, copying the images from the source ImageList one at a time to a new ImageList and stopping at the appropriate places to make whatever changes are needed.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Thanks for putting me out of my misery Dave. I also had the idea of generating another imagelist but was trying to do things more compactly if possible.
Do you know if there is a way of extracting the index of the image file as an integer and store it as another variable?
thanks
|
|
|
|
|
Are you syaing that you want the .Add() method to return the index that the image was put into? .Add() is a sub and doesn't return a value. Since the new image is always appended to the end of the collection, you can probably use the Items.Count property to find out what the next index is going to be before you .Add() the image.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hello to all of you.
If anyone knows I would ge glad if someone could help me on this:
I have a form where there is a panel (call it panel_1). In this panel I want to display 5-6 panels, one at a time, depending on some buttons. Here is what I do. In visual studio .net, I create a new userControl class where I place my panel (panel_2). Then, i go to my main form, where panel_1 is and I add my userControl. But the buttons of panel_2 are BLACK, and it seems that there is no refreshing.
When I run the application, the part of the screen that has panel_2 shows abnormal things such as icons of my desktop!
Is there any bug, when adding userControls. Do i need to do anything, such as repaint or something else?
Thank you in advance!
Kostas Stamatis
|
|
|
|
|
Hi All,
Am getting a problem in crystal reports when getting connected through the dataset.Iam not knowing where the code goes wrong.
In button_click,am generating the dataset and finally
Dim oRpt As New rptDemo
oRpt.Load()
oRpt.SetDataSource(myDs)
crystalreportviewer1.ReportSource = oRpt
Am getting a blank report. Can anyone help me?
Thanks in advance,
|
|
|
|
|
you need to supply the path to your template file to the oRpt.Load call.
oRpt.Load("c:\myReportTemplate.rpt") If you haven't yet defined a report template, then you should do that first when attempting to utilize crystal in this manner.
-jim
|
|
|
|
|
Hi Jim,
Thanks for ur response. Even then am not getting it.
Problem is Iam getting the report, its header fields and all that... but am not getting the values for them. what might be problem.
what might be the problem..?
Basically i have a form with two(let's say) fields and a submit button.On button click, I want to check the access database with these two fields and want to generate a dataset.
Finally, i want to use this dataset to generate a report
Just to test whether my dataset has values or not i just binded it to the datagrid.Its working fine.
Why am not getting the values when am passing it to the report...?If u have any samples regarding to perform the same Would you let me know..?
Thanks in advance
|
|
|
|
|
well, if you have data in the datagrid and you're using the above code to populate the report, i would have to guess that something is wrong in your report template.
check to make sure that in your report template, when you select a datasource you select ADO.Net and point to a schema file that represents the structure of your dataset. then, make sure that you set the relationships of the tables properly on the links tab.
what i actually like to do here is write my code for populating the dataset first, then step through the debugger and write the dataset out to an xml file including the schema.
then use this file as the source for your report. this way you ensure that the xml you're passing to the report template in your code is the same as what you are designing the report with.
hope this helps.
-jim
|
|
|
|
|
dear friend
Actually i have a smart card developed with vb application interface. It has a unique no in it. I want to pass that number in koha log in screen . Koha is a open source lib software built with cgi perl. whenever i will insert the smart card in the reader the specific id no will go to the text box of koha log in screen .
url:"http://hlt.katipo.co.nz/cgi-bin/koha/mainpage.pl"
My question is the id nomcan be shown in a textbox or label of an application in vb, the url can be invoked with the help of web browser.In the text box of that login screen i want to show the id no. HOW?
Thanks in advance
Rana
|
|
|
|
|
hi this is my first posting
i am using xml xttp object in vb for getting information from web i have produced one SITE CRAWLER in vb6 . i need to send multiple requests to travel whole site but while sending multiple requests the application will just hangs some time for getting reply from server so i want to uilised that time also can anybody tell me how to get / handle other events while posting http request
regards yogi
|
|
|
|
|
can we send mail from any pc without the local smtp server on that machine through code in vb or vc.
ddd
|
|
|
|
|
please help me
How j can find the dominant color in a bitmap with a function or with the ColorMatrix?
|
|
|
|
|
This should get you started, it has routines to count and average colors:
http://www.codeproject.com/vb/net/GausianBlur.asp
|
|
|
|
|
hello
i just want to know whay the boolean type take two bytes in the memory knowing that a simple one bit is enough ???
|
|
|
|