"Creating Own File Type" Clarification?

Mar 13, 2012

Okay, I was doing a lot of research this morning and found what I hope to be a promising example (code and installation file in the zip folder I downloaded). Even though it is from 2005, and I am working with 2010.I had to update/upgrade the entire project to view the code, and... ok, I am just rambling.I know how to set the filters for SaveDialog and OpenDialog (took me a long while to understand, but I now understand it), but when I finish and build the project to host it on CNet Download or somewhere similar.

View 3 Replies


ADVERTISEMENT

Creating Custom File Type In .net 08?

Feb 5, 2011

i want to make a custom file type like "abc.xyz" which should have all the attribs of a directory like

moving other files and folders to it, open, close, delete, create new, etc... in vb.net or c#.net

View 5 Replies

IDE :: Creating New Type Of File That Has Its Own 'parsing Language'

Jun 14, 2010

I have been working on a very advanced feature that will allow programmers to right object that spit out other objects. Code that writes code. However, I have run into a problem. I use a file type that specifies to the coding parser how to create the object that is going to write the objects. Example, the Programmer writes a "NTF" file which contains code switches and variables that the Computer will parse and create a "Template Object" that the programmer can include in his project and call to generate the code objects. I'll right a object that creates an ASPX page for each table in my database, and I'll then call that object against my database. It's pretty straight forward. This "NTF" file has special parser commands, and uses VB.NET to manipulate the output based on the variables that come into the object. The problem is I would like to have an editor just as advanced as Visual Studio to recognizes the custom parser commands and the VB.net code. At the very least, something that formats the "NTF" file and integrates into Visual Studio.url...

View 2 Replies

Creating Excel File - Force As String Type?

Feb 12, 2010

I have a vb.net app that I create an excel file with from sql data. It creates it fine but for cells that have a social security number, it makes that cell numeric and removes the leading zeros. Does anyone know how to force this cell as a string when adding it to the worksheet? Is there a property or method I can call to do this in my vb app?

View 1 Replies

Clarification About Which Datatype To Use

Feb 2, 2011

I'm using SQL Server 2008 and Visual Studio 2008 with .NET Framework 3.5. I'm teaching myself and this my first time posting a question here. And I was wondering if someone could clarify something for me.I've created a table called Classes. One of the columns is called Enrolled and is of data type tinyint (0 to 255) since the class will never have more than 50 students enrolled.In my application I created an object called ClassInfo and declared a private variable ..private _classAmt as byteMy question is this..What if someone wants a total of students enrolled for that year? Do I need to convert to a larger data type such as int32 or would it be better to set the data type as Integer in t

View 1 Replies

Get Clarification About GetCurrentProcess In .NET?

Mar 16, 2012

When this grabs the current process, the "current" process is the one that called this function, right? I.E., the process that is requesting this information is the current process, correct? For example, if the process that is running this piece of code right now has a pid of 1, the Process object returned by this function will tell me it has a pid of 1, correct? I cannot possibly get any other process, correct?

View 1 Replies

WPF Clarification On Using Controls?

Jan 21, 2009

I am inclined to delve into it in the near future just to get a taste of it. I am looking into converting my single form Chat program to its WPF equivalent. The form that I am currently using have a RichTextbox control in it, I am not sure how WPF works but do I need to design a Richtextbox control using XAML/XML or just the specification on where it should be located?

View 2 Replies

.net - ByRef Vs ByVal Clarification?

Dec 8, 2010

I've read a lot on this, but am having a hard time thinking through this tonight. (Maybe it's the hydrocodone... just had a root canal. i'm just starting on a class to handle client connections to a TCP server. Here is the code I've written thus far:

[Code]...

Now, on my Socket property, when setting the value, it is required to be ByVal. It is my understanding that the instance in memory is copied, and this new instance is passed to value, and my code sets _Socket to reference this instance in memory. Yes?

If this is true, then I can't see why I would want to use properties for anything but native types. I'd imagine there can be quite a performance hit if copying class instances with lots of members. Also, for this code in particular, I'd imagine a copied socket instance wouldn't really work, but I haven't tested it yet.

View 3 Replies

Clarification For WithEvents Handlers

Feb 11, 2010

When you declare an object 'WithEvents' and then utilize the "Handles" clause at the end of your event methods, how does Visual Basic manage a reference change for the object? In other words, if the withevents var is set to ObjectA, then later I switch it to ObjectB (or nothing), does Visual Basic automatically both remove those handler methods from ObjectA, and attach them to ObjectB? Or do I still have a ObjectA's events being handled behind the scenes?

I ask this because if instead you use AddHandler for an object, and then switch your reference, unless you removed the handler before switching, your original object is still handled (at least I'm pretty sure that's how it works).

View 13 Replies

Clarification On Form Process?

Nov 1, 2010

I have a button that when clicked, creates an instance of a new form and assigns a value to .tag. I have the following code:

Private Sub btnNew_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnNew.Click
If Me.Tag = "NBI" Then
Dim NBIForm As New frmNewNBI

[code]....

View 5 Replies

VS 2008 Syntax Clarification If Not (x And Y) =?

Sep 9, 2009

I would need some clarification on a syntax : could someone tell me why some people in their code use the following :

If Not (xxx And yyy) = 0 Then
'code
End if

instead of

If xxx = true Then
'code
End if

As an exemple : In a code I use for a listview Item Ownerdraw, it sure works like this :

If Not (e.State And ListViewItemStates.Selected) = 0 Then
' draw the listview item code
End If

but not like this :

If e.State = ListViewItemStates.Selected Then
'
End If

View 3 Replies

Quick Clarification About When Have To Remove Handlers In .Net

Aug 6, 2010

If I have a class with a couple of event handlers inside of it which are attached to an object that is defined within the class, am I right in thinking that I don't need to implement IDisposable to remove said handlers, even if I explicitly added the handlers myself? Also, can anyone point me in the direction of an article that explains the scope of when it is needed to remove handlers to avoid memory leaks. (I've tried searching many times but I must be screwing up my search terms.)I have a collection; every time an object is added to that collection, I add a handler to a change event of the object.When I'm done with the collection, do I need to go through each item and remove the handler before setting the reference to null?

View 3 Replies

Creating An IM Type Program?

Mar 23, 2012

Alright I am just starting out with Visual Basic and I am trying to figure out how I would go about doing this. I have the general idea of how I want it to be done but I am not sure of what code I need to use. What I want to do is be able to type in Text box 1 and copy whatever I type into Text box 2. But I also want to be able to send it to anyone else with the program that are listening for a connection. I also want to be able to show the IP address in Text box 3 that the computer is using at the time.

Public Class Form1
Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged

[code].....

View 9 Replies

Creating A Generic List Of A Specified Type?

May 26, 2010

I want to create a generic list - but I want to specify the type at runtime - is there a way I can do this? using reflection perhaps?Something like this...

Public Shared Sub create(ByVal t As Type)
Dim myList As New Generic.List(Of t)
End Sub

View 2 Replies

Creating A List Of Anonymous Type In VB?

Jun 23, 2009

I'd like to create a list of an anonymous type, for example:

Dim dsResource = New With {.Name = dsResourcesEnd(index).Last_Name & ", " & dsResourcesEnd(index).First_Name _
, .StartDate = dsResourcesStart(index).Day _
, .EndDate = dsResourcesEnd(index).Day}

I have created that anonymous type. Now I'd like to add it to a list of that type. How do I declare a list of that type?

View 4 Replies

Creating A Simple Leaderboard Type Application?

Apr 14, 2011

I have moderate experience with VB, and am using 4.0 framework with VS 2010 pro.get a specific way i should accomplish a leader board system where it can manually assign points to players and sort them accordingly.

View 1 Replies

Type Not Defined Error When Creating Class

Feb 26, 2012

First I put it inside a Module and it works just fine. However when I created a Class and put it inside it, it showed up some errors. (they are in the code's comments)

Public Class MyImageClass
'function to merge 2 images into one
Public Function Merge(ByVal img1 As Image, ByVal img2 As Image) As Image 'Type 'Image' is not defined
Dim bmp As New Bitmap(Math.Max(img1.Width, img2.Width), img1.Height + img2.Height) 'Type 'Bitmap' is not defined
[Code] .....

I tried importing the System.Drawing namespace to this class which didn't change anything either. I've never really touched the OOP side of VB.NET before, this is my first attempt creating a class.

View 5 Replies

Creating Array Of Structure Type - Marshaling Error

Jul 23, 2009

I have to create an array of structure type in VB.net. but I am getting error while marshaling this error. I have to pass this array of structure type in to Dll function.
Code:
Structure declaration:
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Ansi)> _
Public Structure dx_entry
<MarshalAs(UnmanagedType.ByValTStr, SizeConst:=10)> _
Public dx As String
[Code] .....

I am getting the following error:
An unhandled exception of type 'System.ArgumentException' occurred in Audit_Demo_2307.exe
Additional information: Type dx_entry[] can not be marshaled as an unmanaged structure; no meaningful size or offset can be computed.

View 1 Replies

Creating A Gridview And Gather The Data From Various Functions That Return A Type Of IEnumerable?

Feb 28, 2012

I am creating a gridview and need to gather the data from various functions that return a type of IEnumerable. I've created gridviews using a dataset as a datasource, but how does one use multiple data sources(of IEnumerable) to populate one gridview? Like how do you combine all that into one dataset?

View 1 Replies

An Error Occurred Creating The Form : Request For The Permission Of Type 'System.Security......?

Sep 4, 2009

we are making our program in other computer it runs, without errors, but then when we transfer the program to another computer it has an error that says

An error occurred creating the form. See Exception.InnerException for details.The error is: Request for the permission of type
'System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

View 24 Replies

Loading A File Into Memory Stream Buffer And Creating New File With Same Content And With Different Filename?

May 31, 2011

I don't know whether it is simple or not because i am new to programming. my requirement is : In my vb.net winform application, the filenames of the files present in "D:Project" willbe displayed in DataGridView1 control. Now I want to load these files one after another into memory stream buffer and add the headers("ID","Name","Class") to the content in the file. Then I want to save these files in "C:" with "_de" as suufix to the filename i.e.,sample_de.csv.

View 1 Replies

File I/O And Registry :: Creating A Text File, And Using It Among Different Windows Users

May 31, 2009

I created an application that when a user logs onto their Windows account, a Form is displayed outlining the current Computer Usage policy set by the insitution and gives the user two options either Agree or Dis-Agree. The two options are in the form of buttons, with events that depending on what the user clicked, will create a log text file at a specified location, with enteries of Date,Time,CurrentUser, and if they agreed or disagreed. If they agreed the application after creating/amending the file will then terminate, otherwise it will update the file and then force Windows to logoff the current user.

Now I made a shortcut of the .exe of the application and placed it in the startup for all users, and yes the application loads at startup for all the users following the procedures mentioned above. The problem I am facing is, that if the current user logs off, or is forced to log off, and another user logs onto Windows, goes through the whole ordeal mentioned above, the application is denied access to the logfile that was created under the previous user, and thus crashes.

So my question is, how can I created a text file using vb 2008 application, that is accessible by multiple Windows users. I have even tried changing the location of the created file to the shared folder, but the end result is the same.

View 1 Replies

Error Creating Directory - Conversion From String "testfolder" To Type 'Integer' Is Not Valid

Feb 8, 2009

I am using :

Dim di As DirectoryInfo = New DirectoryInfo(My.Settings.Outgoing(CreateFolderTextBox.Text)) to create a directory

[CODE]......................

But I get the following error: Conversion from string "testfolder" to type 'Integer' is not valid.

View 4 Replies

Creating Download Link To A File On A File Server

Oct 11, 2011

I'm looking for a way to (easily, by preference ;)) create a download link to a file on a separate file server.The situation is as follows: the application I'm developing (asp.net 2.0 in vb.net but I have a similar issue in c#, either solution works for me) will be run internally for a company.As is good practice, the file storage and web application are on two separate servers.I basically need to be able to create a download link to a file, the only available URL i have to access the file is servernamefolder1folder2folder3file.txt (can be any sort of file)[code]Which doesn't work for obvious reasons. It used to be set up to write that file to the application path itself and that worked perfectly, but it isn't good practice and that's why I'm changing it (or trying to).I read solutions about creating a download page and then having a table in your DB which holds the links and returns the proper web URL for download but the time constraint I am faced with unfortunately doesn't allow me to develop that.

Assuming I can provide a string with the full filepath to the file like the above, what is the easiest way to just create a link that, when clicked, downloads the document? I have 0 admin rights in this environment. That really isn't helping me. Let's assume I am given the correct link like above and have the appropriate file access rights and such.The above example does work in IE, but not in Firefox and Chrome. IE converts it to a file://servername/... link which does what it's supposed to, but FF and Chrome both actively decided that this is unsafe and have disabled it from their browsers.

View 2 Replies

File I/O And Registry :: Creating The Dummy File?

Feb 25, 2009

I am making just a simple program that will create backup dummies of all the files in a specified folder. All I have is 2 text boxes, A and B, and a button to do the magic. What I want is for the user to input into Text Box A the location of all the files, and in Text Box B place in the destination folder, then when the button is pressed it will get the name of each file using a loop and recreate a new file with the same name and extension in the destination folder.For example:

C:FolderX has 10 files in it, each with the same extension (.wav), each file is ranging from 10mb to 100mb (this size is irrelevant)
C:FolderY is empty

What I want to do is create each file from X into Y, however the files are all 0 bytes (no data inside them). I've managed to get a simple script that will do what I need but only if I specify the file name:

Code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim Filename As String = My.Computer.FileSystem.GetName(TextBox1.Text + "test.wav")
Dim SaveP As New System.IO.StreamWriter(TextBox2.Text + Filename)
SaveP.Close()
MsgBox("Files Created")

But what I need is someone to show me how to create a loop that will do this for each file in the folder, without me specifying each filename.

View 1 Replies

Restrict The File Type In The File Browse Menu Of An AsyncFileUpload In The ASP.NET AJAX Control Toolkit

Jul 28, 2010

I would like to restrict what they see in the file upload dialog, which is set to "All Files" by default. I understand how to validate that they only uploaded a certain file type, that is not the question here. I would just like to know how to default the file type in the file selection dialog.

Is there any way to change this to "PNG only" or "*.png"?

This is using AsyncFileUpload in the ASP.NET AJAX Control Toolkit.

View 3 Replies

.net - Creating A Generic List Of A Generic Type

Jun 30, 2011

I am trying to create a list of a generic type in vb.net 2.0 framework.
This is the generic type definition:

Public Class GenericParamMap(Of T)
Public Sub New(ByVal pParamName As String, ByVal pPropValue As T)
mParamName = pParamName

[Code]....

The compiler does not allow a "T" in the method's parameter because it's not defined, but I'm not sure how or where to define it. I thought it was okay to have a generic method definition.

View 2 Replies

File I/O And Registry :: Type Of Data File?

Apr 9, 2010

I'm trying to read in a file. I'm not even sure what kind of data the file contains. Is it binary, unicode, etc? Or maybe it is encryted? I doubt it is encrypted, but I really have no clue. I am pretty sure it contains geometric/drawing data. It shows most characters as boxes.I've attached a picture of the contents when I open it in wordpad. Does anyone have a clue what type this is? and how to get it into a readable format using vb.net?

View 5 Replies

Asp.net - Creating A Doc File From .net Web App?

Jun 3, 2011

I have a vb.net web app, and I need to give my users the facility to download a ms-word .doc file. This file needs to be created dynamically, and should contain some bold text and a table.

I've come across this code, which builds a .doc file, and lets you download it:

Private Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim strFileName As String = "GenerateDocument" + ".doc"

[Code]....

...but I don't know how to make the text bold, or create a table. I'm sure there's a better way.

View 1 Replies

Creating A .exe File?

Jan 6, 2011

notepad file means that is used for .java file and .txt files.so this files should be converted into .exe file using the vb.net environment.so, if its required software is not installed in any pc, that file will be opened without its installation s/w....I know this is used without the code.. creating a .exe file i hav to write a code..

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved