Problems, problems... Here's an example: In one file I have some strings. In first row string 1, in second string 2... How can I get in my program that randomly select one string and put in textbox?
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Loading From A Flat (txt) File To Listbox
I have an input file similar to the one below:-
- The first 6 characters (1,6) for all rows would be the same . Following this
- in the first row (7,1 st position) there will be some 1 digit
- in the second row there will be EOL(7,3 rd position), followed by 9 Characters (H6E016094)(10,9 th position)
- in the third row there will be 95 followed by 7 digits (4125159) (9,7 th position)
How do I strip these fields from file and diplay that in a form inside a List Box. Below is how I expect to see the value from the file to be displayed.
Column1Column2 Column3 Column4
1 EOL H6E016094 954125159
Is using Listbox is the correct approach or how do I go about?
Combobox, Apearance FLAT = NOT FLAT?
I prefer to use 'flat' textboxes (appearance = 0-Flat) and stuff. Why is it that a combox with the property appearance set to 0-flat isn't flat but 3d?
Can it be fixed?
Are there any other options?
An Error Occurred While Loading 'ThisDocument'. Do You Want To Continue Loading This Proje
When attempting to open a Microsoft Word document programatically using VB 6.0 Active x Dll the following error message titled "Microsoft Visual Basic" appeared
An error occurred while loading 'ThisDocument'. Do you want to continue loading this project?
once i click no it throws an error with no 5981 i have trapped that in the below segment
and if i click yes it opens up and says that " word cannot fire event"
On Error goto Err_Occured
If wrdDocument Is Nothing And Not wrdApplication Is Nothing Then
Set wrdDocument = wrdApplication.Documents.Open(sSourceFilepath)
If Err.Number = 5981 Or Err.Description = "Method '~' of object '~' failed" Then
If Not wrdDocument Is Nothing Then
Set wrdDocument = Nothing
MsgBox "Error Occured while processing documents"
once the error is trapped i close the word instance which i created.
but when i tried in windows 98 and word 97 the winword crashes.
and when i process an other good one an MS word instace is already created ?
can anyone please tell me what the problem is and its workaround ?
Loading Obtjects When Form Loading Or Changing Values
when my form is loading some textboxes has to load automatically, like 30 and If I change the value with a button to 31 textboxes should be load.
I know within an array, but what 's the exact instructions that I need.
How can I do that??
thx for the help
Hello, does anybody have an example of declaration and use of the GDI+ flat API function GdipLoadImageFromFile()?
It's simple, whatever I pass in the first parameter, the function keeps returning 3 ("Out of Memory").
PD. No TLB, no wrappers. Only plain access to GDI+ please.
ive looked everywhere but cant seem to find this
how do you make a flat fie
and what does it look like
and also how do you link this flat file into a vb6 program
specifically to show a bunch of stored questions and an answer for a quiz program
just point me in the right direction
Is there any Functions or API is available for Flat setting ?
In my application I want to set the control's appearance to Flat. Currently all controls are showing as 3D. By clicking one button, all controls should be changed to Flat.
Earlier I had try APIs, but no luck. Then I was trying to make flat by looping (Taking all controls and making flat in a loop), But it is too slow and it is taking some time
Is there any short method ?
Thanks in Advance
Why is it that i can't obtain a flat graphical button even though I set the Appearance and Style properties accordingly?
Flat Scroll Bar
I need a flat scroll bar for my .ocx but I want it to respond to the mouse wheel when it has the focus like a normal scroll bar would
I have 3 ideas on this and help with any or an alternative suggestion would be appreciated (I can't use SetCapture, and would prefer not to hook)
1)make flat scrollbar respond to mouse wheel
2)make the normal scrollbar's backcolor grey to look like a flat scroll bar
3) use a flat scrollbar with a hidden normal scrollbar that has the focus, and which move in unison (problem here is it only works when you can see the normal scrollbar)
I need to create a report that will pull up information from a database as a flat file. I have created the form but as this is my first project not sure where to go from here to create the flat file and to create a test file for a test upload. Please help.
Guys and Gals,
I have been handed a requirement to convert and existing Access database system to a visual basic project. I have spec'd the project and only have one problem remaining. The user interface. The client wants the vb app to look exactly like the existing database. The only problem I am having is using flat controls. I need to create a series of flat controls (combo, textbox and listbox) and be able to change the border colours of each one. I have managed to create activex "copies" of each one but am having trouble adding a border to ecah that I can change the colour of. Does anybody have any ideas on how I can do this?
How To Flat Buttons
how can i make flat option buttons? similar to the toolbar, flat but raises when mouse hovers.
hi, does anyone know which component to create flatbutton, and what it is for actually? do we need to download anything in order for it to be able to viewed in normal visual basic?
GDI+ Flat API Calls In VB.net
I have been looking high and low for any sort of information on using the GDI+ flat api calls using .net. Specifically GdipLoadImageFromFile, but for that matter I cannot even get GdiplusStartup to return successfully.
Heres a little context for the use. This is for a thumbnail generator, the problem is that when you call the functions in the wrapper classes it automatically does something called "image data validation". This is terribly slow, and apparently is recognized by Microsoft as a problem which they do have a patch for. Unfortunatly, they are keeping a death grip on it until the next framework service pack. Here is a link to the KB article:
with the fix installed, you can load images from disk 97% faster. Thats a pretty serious increase. There is a gentleman who has coded a workaround in the meantime, it appears to be in C#. I am wholly unfamilier with C# and have been trying for quite a while now to convert this code to VB. Here is the link to his workaround:
I have seen posts by OnError written a little more then a year ago that accomplished something similar to this in VB6, I have studied his code as well. but am still unable to make it work correctly.
Here is what I have so far, perhaps it's something simple that I am overlooking.
Declare Function GdiplusStartup Lib "gdiplus.dll" (ByVal token As Long, ByRef inputbuf As GdiplusStartupInput, ByVal outputbuf As Long) As Long
Declare Sub GdiplusShutdown Lib "gdiplus.dll" Alias "GdiplusShutdown" (ByVal gToken As Long)
Declare Function GdipLoadImageFromFile Lib "gdiplus.dll" Alias "GdipLoadImageFromFile" (ByRef FilenameW As String, ByRef gImage As Long) As Long
Dim GdiplusVersion As Long
Dim DebugEventCallback As Long
Dim SuppressBackgroundThread As Long
Dim SuppressExternalCodecs As Long
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim tStartup As GdiplusStartupInput
Dim token As Long
tStartup.GdiplusVersion = 1
Dim ret As Long
ret = GdiplusStartup(token, tStartup, 0)
Dim hnd As Long
ret = GdipLoadImageFromFile(Application.StartupPath + " est.jpg", hnd)
Dim ptr As New IntPtr(hnd)
Dim bmp As Bitmap = Image.FromHbitmap(ptr)
Any help would be greatly appreciated
Hi all, I am looking for help with the best way to create a table?
The initial plan is to construct a database that can simply hold data about music, for example windows media player library. But what is the best way to construct this type of table?
Flat Combo Help
Hey guys i need a little vb help with my Flat Combo Control. What i need to add is the List so you can add items to it from the menu like a standard one that comes with vb6.
The code has been attached. Hope someone can help me out.
setting control box property of a form to false , caption to null and borderstyle as fixed single gives a flat border to form .
But can i have the same result at runtime ?
ADO And Flat Files
How do I read the contents of a file into an ADO recordset? I know how to save a flat file from an ADO recordset, but how to do the reverse? What's the connection string? What's the command text? What's the significance of the cursor and the lock in this case?
Flat Button OCX
Here is another ActiveX Control attached is the sample project..
Copy the accompanying FlatButton.ocx file into the System Directory and register using regsvr32.exe then run the project
Flat Scrollber Bug?!
I just noticed (again) that you can't have a vertical flat
scrollbar in a ListView??? It only shows the horizontal one and
there's no option to add it. Do I need to use API then?
probably a simple properties thing but i would like to make my buttons flat with a single color border and no selection. like using a picture for a button. can i?
SStab Flat Look How?
anyone know how to make the SStab look flat no 3d just a black border similar to the flat look of a non-3d Textbox
Don't know what the 3DSMax controls look like but I like this:
I've got text files coming in and I need to parse them for comma delimited structure. Any hints on how to get this going?
Sometimes when I load a control at runtime, its constituent textboxes look flat instead of 3D. i tried to set the borderstyle properly i n c o d e, but it doesn't matter.
Why is that and what can i do to fix it (and don't tell me to use the API, I could think of that myself)?
Really FLAT Window?
I have some file, and its window has only black 1px bold rectangle, instead of the 3D gray one. I can add a rectangle to the form, and crop the form region. But I need the rectangle around whole form - and it has menus (so None BoderStyle is not possible)... solution?
Flat Combo Box
how do i get a flat combo box like the one's in MS Word
thanks in advance
I work with VB 6.0 on a win95 system. I am trying to get my buttons to appear flat. However when I set the apperance from 3D to flat, nothing changed? What am I missing?
I need to be able to check a flat file for key phrases How can I do this:
ITEM_BLOCK MASTER_MAINTENANCE /ROW=3 /COL=7 &
I need to look for /Facility in the block above..
Can anyone explain to me how to create a flat menu such as those used in MS Money. I have found ocx's that will allow me to create all the other basic controls but not the menus. Thanks in advance.
VB6 && Flat Files
Which Connection String do I use for Flat Text Files? I am trying to write a program that will examine the files for accuracy before they are sent to the actual databases. I do not want them to be able to write, just read. If there are errors, they need to go back to the originating system and make the corrections.
Can anyone give codes to make combobox appearance flat.Of course in the property bag of (CB) option flat is given but it hardly gets flat.Please help.
Buttons Won't Go Flat
Hi Guys and Girls,
I have set the appearance property of the button in VB6 to flat but the button is still 3D.
Can you give an insite into any other properties I have to set to make the button flat.
Flat Combo Box
i have downloaded source code for flat combox. but when it is runngin my system is not responding. help me in this regard
u can see the source code at
Flat Buttons In VB6
Can we create flat buttons in VB? If so please let me know.
Flat Combo Box
can any one help me to change the appearance of combo box into flat shape.
thanx in adv
Flat Combo Box
how can i make combo box appear flat using vb.net?
or how can i make it appearing it as in windows xp using vb.net
Flat Buttons In VB
What am I doing wrong? When I set the Appearance property of a command button to Flat, it remains as 3D.
MDB To Flat File
I'm writing program from scratch:
I have to read MDB tables and write in Flat File.
Could any 1 pls. help me by showing the sample file.
I really appreciate ur help.
Thankx a lot
I have a Word document with delimiters. Each field is separated by a delimiter. Making use of delimiter in files I have developed a program to add these fields in the front. one of the fields is a definition field.
This field needs formatting of keywords.Any Keyword in the definition should be pre formatted in application.I tried to use Richtextbox's find and span. But it didnot work. Can anyone help me out with this problem. If u need more clarity of my problem, please mail me at email@example.com
ADO And Flat Files
Using Ado (Access 2000) and vb6 I have tables that are updated using flat files (comma delimited) by deleting the data and replacing it with the data in the flat file. I also have some tables that I want to back up and restore using a flat file.
I read Q262537 on using Jet to do this. This method is a lot faster but, it seems to be ignoring the first record.
On my backup, I create a flat file. My table has 4 records in it. The flat file has 4 lines of data in it, but when I read the file using jet it has only 3 - ignoring the first record.
I seem to remember reading that access uses the first line to set up the type but I couldn't find it again - also unnecessary in my case.
Is everyone setting up a header record to get around this problem?
ActiveX For Flat Combo Box On Vb-6.0
Is any ocx/activeX/control out there for make visual basic 6.0 combo box flat?
I am interested for free stuff. or any code to make combo box flat?
I know its easy with vb.net . but i like it on vb 6.0
Its Not Working...buttn Flat
i change the property of a button to flat from 3d but it looks the same at runtime...why is not working? i'm working on vb6...
How Many Items In Each Row Of A Flat File
I have a quote/comma delimited file like this:
With this example, it would be easy to say (assuming row & col 0 exist) that row 1:col 2 = "peas"
Since my app can use ANY quote/comma file, I want it to be flexible enough to determine, at runtime, if each row has 5 items or, for example, 500 items.
If I do this:
Open app.path & "myFlatFile.txt" for Input as #1
Do While Not EOF(1)
Input #1, myItem
While looping, it would be nice to know if it has moved to the next line (or row). As soon as it does, if I had been counting, I would know exactly how many items exist in each row. This is what I need.
Flat And Borderless DataCombo
Can anyone please help me in changing the datacombo to flat style without any border. I am using the SetWindowLong api for doing this change on the DatePicker control, But it has no effect on the DataCombo control.
I am using the following line for the DatePicker
SetWindowLong Dt.HWnd, GWL_EXSTYLE, &H4000
Thanks in advance
Emails To Flat Files
Can anyone help.
Is it possible to get a vb program to search the inbox of an outlook email
and loop threw each email and save the contents of the body text to a flat file, then delete the email.
If so, any code snippets would be appreciated.