|
There is PictureBox.SizeMode with a lot of choices for you.
|
|
|
|
|
Subtle!
------------------------------------
I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave
CCC Link[ ^]
Trolls[ ^]
|
|
|
|
|
I am.
|
|
|
|
|
I wrote an XML schema in Liquid XML Studio Developer Edition. I had the software create a sample XML file based on the schema and now I'm trying to write a VB application that will create a valid XML file. I can get the entire XML file to write properly, except for the root element, which cause the file to not validate.
In the sample XML file that was created based on the schema, the root element looks like this:
<mycompany:RawData xmlns:mycompany="http://www.lewcorp.com/2011/RawJbxSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.mycompanywebsite.com/2011/RawDataSchema" UnitType="Commons" version="string" MinVersionRequired="7">
The code I currently have is this:
Using writer As XmlWriter = XmlWriter.Create(XMLFileName, settings)
With writer
.WriteStartDocument()
.WriteStartElement("lew")
.WriteAttributeString("xmlns", "mycompany", "", "http://www.lewcorp.com/2011/RawDataSchema")
.WriteAttributeString("xmlns", "xsi", "", "http://www.w3.org/2001/XMLSchema-instance")
.WriteAttributeString("xsi", "schemaLocation", "", "http://www.mycompanywebsite.com/2011/RawDataSchema")
.WriteAttributeString("UnitType","Commons")
.WriteAttributeString("version", "1.0")
.WriteAttributeString("MinVersionRequired", "7")
However that produces this:
<mycompany xmlns:mycompany="http://www.lewcorp.com/2011/RawDataSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" schemaLocation="http://www.mycompanywebsite.com/2011/RawDataSchema" UnitType="Commons" version="1.0" MinVersionRequired="7">
I have tried modifying the lines that write the attribute strings for the past hour and can't get it to match. There are two items that I can't figure out. First is why the schemaLocation does not have the xsi prefix. However the main thing that I believe is causing my XML file to not validate is the fact that the root element mycompany does not have the suffix of RawData .
I will admit that this is the first time I'm using the XmlWriter but I just can't find anything online and don't exactly know what to search to fix. Although it seems that what I'm trying to do is not absolutely necessary, my company wants it that way because eventually we are going to have several different schemas that will mark various stages of data analysis (for example we might have mycompany:RawData, mycompany:Reviewed, mycompany:Merged). Plus we very often share data with other companies so we also want our name in there.
Any help would be greatly appreciated. Thanks in advance.
|
|
|
|
|
hi,
i am a vb6.0 user and i would like to know how to get unique serial no. of hardware like RAM, MotherBoard, Harddisk. and after getting this code how do work like when i make a setup than it will display this serial no on screen and when i use this to generate key for that harware and how i will check. so no one can use withour serial key generated by me.
Thanks
Regards
Pratik Sagar
|
|
|
|
|
You can obtain some of this information via the WMI[^] system.
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
|
Good link, I knew there was something in the back of my mind better than WMI.
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
That's just WMI to begin with, but it's also a lousy article. The vast length of which is nothing but a list of WMI classes, with barely any discussion of what's going on.
|
|
|
|
|
Lots of 5 votes though!
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
Yeah. IMHO, it's because of the cut'n'paste nature of the code, not because it's teaching anything.
|
|
|
|
|
isn't that just WMI?
|
|
|
|
|
You're right, I misread something - again.
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
I have a Visual Basic 6 project
when I update in the form of the project then run the application from inside the Visual Studio 6 every thing goes fine.
When I build "Make" the exe the Visual basic ignore all my code updates and the exe appear as if I didn't change any thing.
Any Idea !!!!
|
|
|
|
|
I would try deleting or renaming the previous executable and "Make" it again. That should get you the latest build with the latest changes.
If all else fails why not try .NET. Just a thought.
|
|
|
|
|
This hint helped me to find the issue.
By some reason I kept calling old exe version rather than the new compiled one
|
|
|
|
|
I am glad that helped. I have done that same exact thing.
|
|
|
|
|
Please check all the components and reference u have add to the projects before creating EXE.
|
|
|
|
|
hi,
i would try to register the .exe first and then expect the changes to appear IF running it from outside of Visual Studio
|
|
|
|
|
Thank you.
The exe was designed to be called from the Run tool and pass some parameters as argument to it.
By mistake I renamed the exe and put a space in its new name. then I figured out that the run command utility doesn't support having space in the exe name and kept calling old exe
|
|
|
|
|
Hello
I am trying to add a service reference to my solution but it propmpts me errors I use the Ip address with web browsers and it works but when i add the service to my solution it gives me this error
the IP address is MYIP:88/sapco/sapcoservice.asmx?wsdl'
Metadata contains a reference that cannot be resolved: 'http://MYIP:88/sapco/sapcoservice.asmx?wsdl'.
There was an error downloading 'http://MYIP:88/sapco/sapcoservice.asmx?wsdl'.
The request failed with HTTP status 404: Not Found.
Metadata contains a reference that cannot be resolved: 'http://MYIP:88/sapco/sapcoservice.asmx'.
Metadata contains a reference that cannot be resolved: 'http://MYIP/sapco/sapcoservice.asmx'.
|
|
|
|
|
I want to develop a program that contains a table so that first column contain names ,second marks third ,Grade and a command button with caption "Provide Grade"
In Grade column will be displayed grades when Provide Grade"is clicked
above 80 grade A
70 to 80 grade B
60 to 70 grade C
50 to 60 grade D
Under 50 grade E
|
|
|
|
|
Its been a long time since I have had VB6 installed so can't remember the exact name of the controls, but in the toolbox there is a grid control.
Then, the docs are your friend (and google).
|
|
|
|
|
Tpaci wrote: I want to develop a program If this is a new project for you then STOP . Download the .net express version and use that. It is free and supported.
VB6 is no longer a supported product and has not been for some years. If you are working on an existing app then you have my sympathies.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Here is an example.
But it will be bether to do it in a dotnet environment
Sub MakeDB()
Dim WrkSpace As DAO.Workspace
Dim db_Temp As DAO.Database
Set WrkSpace = DBEngine.Workspaces(0)
Set db_Temp = WrkSpace.CreateDatabase("C:\Documents and Settings\XP\Bureaublad\test\test.mdb", dbLangDutch, 256)
Set CdInfo = db_Temp.CreateTableDef("CdInfo")
CdInfo.Fields.Append CdInfo.CreateField("SerieNR", dbText, 50)
CdInfo.Fields("SerieNR").Required = True
CdInfo.Fields("SerieNR").AllowZeroLength = False
CdInfo.Fields.Append CdInfo.CreateField("Titel", dbText, 51)
CdInfo.Fields("Titel").Required = True
CdInfo.Fields("Titel").AllowZeroLength = False
CdInfo.Fields.Append CdInfo.CreateField("TypeID", dbLong)
CdInfo.Fields("TypeID").Required = True
CdInfo.Fields("TypeID").AllowZeroLength = False
CdInfo.Fields.Append CdInfo.CreateField("LabelID", dbLong)
CdInfo.Fields("LabelID").Required = True
CdInfo.Fields("LabelID").AllowZeroLength = False
CdInfo.Fields.Append CdInfo.CreateField("PlaatsID", dbLong)
CdInfo.Fields("PlaatsID").Required = True
CdInfo.Fields("PlaatsID").AllowZeroLength = False
Set CDMulti = CdInfo.CreateField("Multi", dbBoolean)
CdInfo.Fields.Append CDMulti
Set CDReeks = CdInfo.CreateField("Reeks", dbBoolean)
CdInfo.Fields.Append CDReeks
CdInfo.Fields.Append CdInfo.CreateField("Prijs", dbCurrency)
CdInfo.Fields.Append CdInfo.CreateField("KoopDatum", dbDate)
CdInfo.Fields.Append CdInfo.CreateField("File", dbBoolean)
db_Temp.TableDefs.Append CdInfo
End Sub
|
|
|
|