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.
Thanks
Ian.
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Flat Files
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
pls help
specifically to show a bunch of stored questions and an answer for a quiz program
just point me in the right direction
thanks
Flat Files
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.
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 Files......
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?
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.
Larry
Flat Files
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 s_nedunoori@hotmail.com
Thanks,
Srini
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?
Working With Flat Files
Hi
The MDB file for my app might or might not be in the same directory as my app. Before I open it, I would like to see if the files exists. If it does, then all is well. But if not, I would like to launch something that allows the user to navigate the files structure to find it, and return me the location. I would write this location into a flat file. I would then, and in the future, open this file, which would be in my location, and so I could open it without further navigation by the user. I'm sure it can be done. I don't know, but may be you do.
Thanks
Robert
Processing Flat Files
I have not programed for some 12 years and now find myself thrown
into the deep end again.I have purchased Visual Basic 6 and
find that I can find my way through it well enough to solve my
immediate problem
Shortly my customer will be changing their output from a text
file to a flat file and this is going to cause me a problem
is there anyone that can tell me how, using Visual Basic I can
access and read a flat file possably about 6 mg in size so that
I can print the contents. My email address is email@removed
Cheers
Peter
Some Problem In Flat Files
Hi all
Can anybody tell me why this code is not working
Open "TESTFILE" for Output as #1 ' Open file for output.
Write #1, "Hello World", 234 ' Write comma-delimited data.
Write #1, ' Write blank line.
This is copied from MSDN
It is creating TESTFILE but not writing anything in this
Thanks in advance
Venky
Message Box And Flat Files
Hi... I'm a newbie in VB programming. Recently, I managed to develop a msg box that contains certain messages to a specific date. For example if the date = 1, the message will be "Message Day 1". I have no problem with date. I've put all the scripts using IF ELSE syntax. BUT, I realized that if I wanted to make changes to the messages, I need to go to the scripts and compile it again. Is there any possibilities that I can put all the messages in a flat file or using Access and I just call it in the VB Script? STILL I wanted the messages to be in a Message Box format. Anyone can help me in to this? I'm at the dead end ...
Access2000 To Flat Files
Hi,
my program should convert Access data to two flat files. These two flat files are read by another program(X) once a day/as user's wish. Next day when program X reads these two flat files the flat files should have only updated/unread data.
The X program is a third party software. By using X I can map my two flat files then click the read button which Validates and reads my flat files and updates it's database. I can't simply update their database by using SQL Select/Update Query. I have to follow( Mydb->FlatFiles->Use X )this procedure. Any Ideas to over come this problem?What is the best way to create flat files without using the tools in the Access 2000?
Thanks in Advance
Comma's In Flat Files
I have a flat file which i need to change the value at certain points in each record. I'm using the traditional Open command. I have a problem since one of the fields in the flat file contains plain text in which the user has the ability to have comma's (,). Visual Basic interprets this as the end of the string when using the Input method. Below is my code.
Do While Not EOF(1)
Input #1, MainString
First = Mid(MainString, 1, 3)
second = Mid(MainString, 5, 10)
Third = Mid(MainString, 16, 8)
fourth = Mid(MainString, 25, 25)
fifth = Mid(MainString, 51, 8)
Last = Mid(MainString, 60, Len(MainString))
MainString = First & "|" & second & "|" & Third & "|" & fourth & "|" & _
fifth & "|" & Last
Print #2, MainString
Loop
This fails if #1 has a comma in the last field. I need to be able to open a file and read one line at a time. Thanks
Help With Using Data Files As Flat-database
I want to use data files to store information for my application.
I want it to be in the following format:
[Header]
[record 1]
[record 2]
[record 3]
[record 4]
[record 5]
I can use Random to get:
[record 1]
[record 2]
[record 3]
[record 4]
[record 5]
but I don't know how to have a header section.
I don't want the file to be user readable and i need a header to store extra info. how can i do this with a random access file?
Flat Text Files As Database?
Hi all,
Can anyone explain me in deatil about using flat text file as database? What r its advantages and disadvantages over Access database and SQL database? Is it good for storing of large amount of data or what? Is it an effective and efficient method for data storage?
What about the security aspects?
Anyone please explain...
Anita
Reading Flat Files From A Directory
I hope that someone will be kind enough to help me solve this problem I am having. I am trying to create a program that is continuously running that monitors the directory and by default displays the file with the biggest file number - the youngest file in the set. Because every new .evt file name is the next number in the sequence, the most current file is the one with the highest numerical value for its name. The files look something like this 8765.evt.
Rather than any selection process, we simply want to cursor through the file set. In other words; by default (after two minutes of inactivity) the display will always show the youngest file. If the user wants to see something made earlier that day, the user will press the cursor up key – or an arrow on the screen, and the file with the previous number will be displayed; MaxFileNumber minus 1. Another Up arrow, and the user sees MaxFileNumber minus 2 and so on. If you want to see the load they made at noon, and they’ve made three since then, you cursor up three times.
I also want to back up a whole day, we just need to know the number of the first file for that date, then display it. Maybe a CTRL cursor up does that. The relationship between any day and the lowest numbered file for that day never changes. We can have the program re-read the directory when it loads, or store that info in an external data table that the program can read.
Any help will be greatly appreciated.
Thank you
Bensta
Limiting Flat Files To A Specified Size
Is there a way to limit how big a file can grow and to delete or overwrite old data. ie. I have a VB Application that is writing to a log file using APPEND. This file can get pretty big if I don't clean it up.
This is my function that writes to the file:
Public Function WriteToFile(LogFile As String, LogMsg As String)
On Error Resume Next
Open LogFile For Append As #1
Print #1, LogMsg
Close #1
End Function
I call this function as follows:
WriteToFile App.Path & "LogFile.txt", "String that gets inserted into the file"
Would any of you know how I could limit the file to say 100k?
Thanks
Importing Flat Files (Resolved)
Hi,
I am writing in VB6 to read a MS Access DB (JET). I am wanting to update this DB through importing a series of flat files, which will then update the appropriate tables. The flat files are comma delimited, and also has "" surrounding the entries, although in regards to the "", I am sure I will be able to manipulate the data once imported. The first line of the flat file contains the column headers, which I don't wish to import - I am only interested in the data. The big question is - how does one import flat files into a MS Access DB through VB6? I have searched, and read some books - all allude to being able to do this, and I know that this can be done (I have used programs that do this), but I cannot find examples of how this is done. This might be really obvious and simple, but only when you know what you are doing in regards to this.
Thanks in advance.
Edited by - dsykes on 11/17/2004 6:59:01 PM
Importing Flat Files To Access2000 Using VB6
Hai All
I am developing a software which has an Inter face with DBF Files,The problem
I am facing is how to Write A Script Code to Import The Data base In to Access -2000
(remember the DBF Has Over 100 columns to Import) Its working Fine when I am using Get external Data -> Import table in Access -2000 But Not In Code
Can any one help me
Working With Very Large Flat Text Files - Best Way??
A new project I'm working on requires me to compare the data between two flat text files. They are not delimited. I do have the layout however so I know what data means what.
One file has over 50,000 rows and the other has about 4,200. I have to compare one field in the smaller file and then find the corresponding entry in the larger file.
First I tried to use the Open statement and I just read line by line and then opened the other file and just tried to match the data. That worked however it was not very fast. Took many hours.
So then I thought that I would load that data from both files into recordsets and then start to compare. That took about 4 1/2 hours just to create the first record set.
So now I am thinking the problem is that the data is not technically in a "database" and if it was in a database then it would be much faster.
So I opened up Access and just loaded the data into the database. Took a while to tell it what field started/ended where but once that was done it took only a few seconds to load the larger file.
So what I would like to do at this point is to create a connection to an Access database and then load the sequential files into two separate tables in Access. I think this would be possible to do from within VB 6? But this is something I have never done before. I have created Access database and loaded databefore but never done it with a sequential text file as the source.
Once I can get the two files loaded into those two tables then I would create two recordsets and compare the data that way producing a new table with my output. At that point I can provide a report for them to print out.
Anyone have any ideas how I can load these files into access?
I want to can either define the fields first in Access or VB. I have the table structure already layed out while I was trying it out just by using text file manipulation. I also the two table structures already in Access with no data in the tables. Either way would be fine.
On another board someone said "Why bother putting it into Access at all if you don't need it there". That's a good question. Technically speaking I do not need the Access file but I figure that it would be quicker in the long run. The text files will come out once a month. Once loaded into the Access DB and manipulated they will not need those text files again. But I do not specifically need them - is it possible to just use Text files? Won't I run out of memory? Won't it just take far too long? Opinions?
Any ideas?
Reading Flat Files Into Access Tables
i am trying to read a flat sequential file and transfer the data into an access database table using vb.net.
i am having problems reading the file data directly into a dataset. can this be done directly?
or do i need to use some type of "dataset linked vb object" (like a DataGrid maybe) which i can fill with the file data first?
thnx much
Edited by - lord shmoo on 5/1/2005 12:43:19 PM
Flat Files, Reading Writing And Amending Records
Right I can read the file and write to the file but I need to work out how I could amend an entry in the file the entries are;
fred-211085
so in the text file name and then telephone number, I use two text boxes for input so I would suppose I would be using getleft and getright to edit either entry, the name or the number but I cant work out how to do it.
Also how could I delete an entry in the flat file, both the name and the number?
Thanks for any help.
Can You Create A Client Server System Using Flat Files
I am trying to write a program that will read records from a flat file (around 40-50 characters on a line, then there is a carriage return line feed and then next record).
Then I would like to convert/extract pertinent info from each record to send it to an AS/400 server, preferably with a time stamp, a 12 character number and 0 or 1 key number for identification purposes.
Finally, test to see if the flat file is at the end of file (obviously, if false, continue with next record). If true, Write to a new file (a backup file that will contain the data from the original flat file) and delete the original flat file.
An example of the flat file, as follows:
199909020646500700201610016782000000000NL070V100000000I4X1FA15B1C10D6V1000025054054100026001002
199909020646520700201600240195000000000NL070V1000000000I4X1FA15B1C9D6V1000025054054200026001002
199909020646540700201600284792000000000NL070V1000000000I3X1FA15B1C8D6V1000025054054300026001002
What I know!
I will open the file using Open and then use the Line Input statement to read the data one record at a time. Then use the Eof function to see when I have reached the end of the file.
I don't know how to send the information to the other computer. The middleware and communication between the PC and server is MQSeries (The AS/400 will not return anything to the PC).
I do not know how to send the information and how to write to a new file and continually append to it (without deleting anything from the written file)....
Thank you for your help in advance!
Respectfully,
Robert Coffey
Encrypt Your Text Files For Emails
I wrote this really cool program that allows you to encrypt your text files. It is also great for encrypting text for emails. download it and check it out Download it here . Dont worry it is virus free, scan it if you are worried
Parsing Flat-File Ascii Files With HTML Like Tags
Hi!
I am faced with a programmer's block on how to parse a flat file ASCII file
The project is an English Dictionary. The data are in 10 files each around 3.5 MB with all the English Words and their meanings. 75% work done!
Now the files are structured with heading, words, meanings, emphases and multiple meanings numbered for each word, all enclosed in html like tags "<P>", "<DEF>", etc.
How do I go about parsing the files and extracting only the data and storing them in Dbase?
I know this tantamounts to coding a mini-browser But it has to be done. nevertheless.
I am totally stuck in taking the even the first step
Any and all help is much appreciated.
Regards and thank you in advance for all the help
Kaushik
Need Some Help With A New Project. Involves Large Sequential Flat Text Files.
A new project I'm working on requires me to compare the data between two flat text files. They are not delimited. I do have the layout however so I know what data means what.
One file has over 50,000 rows and the other has about 4,200. I have to compare one field in the smaller file and then find the corresponding entry in the larger file.
First I tried to use the Open statement and I just read line by line and then opened the other file and just tried to match the data. That worked however it was not very fast. Took many hours.
So then I thought that I would load that data from both files into recordsets and then start to compare. That took about 4 1/2 hours just to create the first record set.
So now I am thinking the problem is that the data is not technically in a "database" and if it was in a database then it would be much faster.
So I opened up Access and just loaded the data into the database. Took a while to tell it what field started/ended where but once that was done it took only a few seconds to load the larger file.
So what I would like to do at this point is to create a connection to an Access database and then load the sequential files into two separate tables in Access. I think this would be possible to do from within VB 6? But this is something I have never done before. I have created Access database and loaded databefore but never done it with a sequential text file as the source.
Once I can get the two files loaded into those two tables then I would create two recordsets and compare the data that way producing a new table with my output. At that point I can provide a report for them to print out.
Anyone have any ideas how I can load these files into access?
I want to can either define the fields first in Access or VB. I have the table structure already layed out while I was trying it out just by using text file manipulation. I also the two table structures already in Access with no data in the tables. Either way would be fine.
Any ideas?
Carriage Returns And Line Feeds In Flat Text Files - Some Findings
Hi!. These two threads made me want to do this. Any comments/corrections will be greatly appreciated
http://209.120.143.185/showthread.ph...BLF+Print+Open
http://209.120.143.185/showthread.ph...BLF+Print+Open
As those threads point out, CRLFs are very common delimiters for us VB Programmers and messing them up creates huge problems.
Generate the text file from the code. Open the generated file using Different Text Editors. I have used the three I have; NotePad, WinWord (Office 2000), WordPad
Save the text file from each editor, using a different file name.
The text editors automaticaly choose the "Save As Text" format. Do not change this format!
Generate the comparison file.
What I think is happening is some app creates a flat text file with Line Feeds or Carriage Returns or Both
Since these flat files are named ".txt" files, when we open it, it opens, either in Notepad or Wordpad depending on the size of the file.
We edit it to our convenience and just do a "File-Save" or a "File-Save As".
All the Linebreaks therefore get messed up.
Solution(s)?. One way is what I did in the two threads I have posted.
Strip Carriage Returns, Split by Line Feeds, Reconstruct.
Any other ideas would be greatly appreciated
VB Code:
Const VB As String = "VBtext.txt"Const NP As String = "Np.txt" 'Plain Windows Notepad FormatConst Word As String = "Word.txt" 'Microsoft WinWord (Office 2000) "Save As Text" FormatConst WP As String = "WP.txt" 'Plain Windows WordPad Format Dim Path As String, CheckString As StringPrivate Sub evaluate_Click() Dim strNP As String, strVB As String, strWord As String, strWP As String Dim kByte As Byte Open Path & VB For Binary As #1 For i = 1 To LOF(1) Get 1, i, kByte strVB = strVB & " " & CStr(kByte) Next i Close #1 Open Path & NP For Binary As #1 For i = 1 To LOF(1) Get 1, i, kByte strNP = strNP & " " & CStr(kByte) Next i Close #1 Open Path & Word For Binary As #1 For i = 1 To LOF(1) Get 1, i, kByte strWord = strWord & " " & CStr(kByte) Next i Close #1 Open Path & WP For Binary As #1 For i = 1 To LOF(1) Get 1, i, kByte strWP = strWP & " " & CStr(kByte) Next i Close #1Open Path & "Compare.txt" For Output As #1 Print #1, "Original Text :->" & strVB Print #1, vbNewLine Print #1, "Saved From NPad:->" & strNP Print #1, vbNewLine Print #1, "Saved From Word:->" & strWord Print #1, vbNewLine Print #1, "Saved From WPad:->" & strWP Print #1, vbNewLineClose #1Shell "notepad " & Path & "compare.txt", vbMaximizedFocusEnd Sub Private Sub Form_Load() Path = App.Path & "Crlf"End Sub Private Sub GenVBtxt_Click()CheckString = "Hello World" & " " & "Hello VB Forums" & " " & "KayJay" & " " & "Kaushik Janardhanan" & " " & "End of Test Text File"Open Path & "VBTEXT.TXT" For Output As #1 Print #1, "Hello World"; ' 11 Bytes Print #1, vbCr; Print #1, "Hello VB Forums"; ' 15 Bytes Print #1, vbLf; Print #1, "KayJay"; ' 6 Bytes Print #1, vbCrLf; Print #1, "Kaushik Janardhanan"; ' 19 Bytes Print #1, vbNewLine; Print #1, "End of Test Text File" ' 21 Bytes 'VB adds a Chr(13) Chr(10) here automaticallyClose #1 MsgBox "VB Text File Created"End Sub
If you analyse the compared output you will find that
(1) MS-Word adds a Carriage Return when it encounters a Line Feed
(2) WordPad makes sure all LineBreaks are a CRLF. It sees a lonely Line Feed, it adds a Carriage Return. It sees a Carriage Return all by itself, it adds a Line Feed.
(3) Notepad simply does nothing. It just does not recognize a Carriage Return or a Line Feed as Line Breaks when they are by themselves. It just shows a black box. It displays a LineBreak only when Carriage Returns and Line Feeds come in pairs.
Should try with more text editors to see if something more crops up.
Attached is a zip file with the Text Files already saved from the different editors. Any comments/suggestions/solutions ?
Combobox, Apearance FLAT = NOT FLAT?
Hello group,
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?
regards,
VisualSander
Sending Emails With CDO, How To Catch Problem Emails?
I have an automatic email function in my app, and the code looks like:
Code:
formAllEmails.MousePointer = vbHourglass
'setup for email
Set objemail = CreateObject("CDO.Message")
objemail.From = emailDisplayName & "<" & emailAddressDB & ">"
objemail.To = p_email
'***************
'needs to chang to check type, then send appropriate message
'***************
objemail.Subject = "An update on from " & emailDisplayName
objemail.TextBody = message
objemail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
'Name or IP of Remote SMTP Server
objemail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserver") = emailServer
'Type of authentication, NONE, Basic (Base64 encoded), NTLM
objemail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = cdoBasic
'Your UserID on the SMTP server
objemail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusername") = emailAddressDB
'Your password on the SMTP server
objemail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendpassword") = emailPassword
'Server port (typically 25)
objemail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = emailPort
'Use SSL for the connection (False or True)
If emailSSL = "1" Then
objemail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = True
Else
objemail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = False
End If
'Connection Timeout in seconds (the maximum time CDO will try to establish a connection to the SMTP server)
objemail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 30
objemail.Configuration.Fields.update
'==End remote SMTP server configuration section==
objemail.Send
formAllEmails.MousePointer = temp
End If
Exit Sub
hell:
formAllEmails.MousePointer = temp
If Err.Number = -2147220973 Then
MsgBox "The server could not make the connection to your email account. Please check the information and try again"
Else
MsgBox "An internal error occurred. Error code: 4000-" & Err.Number & Err.Description
End If
But the problem is this: when I am sending more than one message out if there is a problem with the email address (mailbox full, bad addy, etc) how can I keep sending all the others? I dont want to abort the process because of one bad addy or one box that is full or ...
thoughts?
Also, does anyone have a list of CDO error codes?
EDIT: found the codes: http://www.cdolive.com/cdo11.htm
Flat GDI+
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").
Thanx.
PD. No TLB, no wrappers. Only plain access to GDI+ please.
Flat Appearance
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
Raj
Flat Button.
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)
Loading Flat
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?
Thanks!
by frANZi
Flat Controls
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
hi!
how can i make flat option buttons? similar to the toolbar, flat but raises when mouse hovers.
thank you!
Flat Button
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?
thanks
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:
http://support.microsoft.com/default...b;en-us;831419
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:
http://weblogs.asp.net/justin_rogers...31/105296.aspx
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.
Code:
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
Structure GdiplusStartupInput
Dim GdiplusVersion As Long
Dim DebugEventCallback As Long
Dim SuppressBackgroundThread As Long
Dim SuppressExternalCodecs As Long
End Structure
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)
End Sub
Any help would be greatly appreciated
Thank you
Flat Table
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?
Mathy.
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.
Flat Border
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 ?
Thanks.
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?!
Hello!
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?
Flat Buttons
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
Flat Controls
Don't know what the 3DSMax controls look like but I like this:
http://www.devpower.com/flatbutton
Flat Controls
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)?
|