LizR 171 Posting Virtuoso

As I said before, work it out on paper, you have a few ways to do it. One is messier to code but easier on the eyes, the other a bit more maths but easier to code.

Either way, its a logic issue not a coding issue, so have a go at working out how you might do it.

If nothing else, start a new console based app, and get it to print numbers 1-15 for page 1, and then move to page 2, and back, and so on. so you can concentrate purely on that aspect.

LizR 171 Posting Virtuoso

Much like ddanbe, people who know me, know as a whole I actually would probably be placed in the "anti microsoft" camp, so, Im not getting any benefits, payback either..

VS (express or otherwise) is a good product, its fast and snappy. The express ones doubley so, and of course free.

Sure, if you're working on linux or mac's you can have good reason express isnt for you, but anyone with windows, Id have to question why if you are new to c# you chose to make your life so much harder than you needed.

LizR 171 Posting Virtuoso

At the same time, MSDN gives examples to pretty much everything, so even if you dont understand it fully, it does explain it, if you dont understand something on MSDN, perhaps you would learn to teach yourself better by asking something like..

Im trying to do <this> I found <this> on MSDN but I dont understand <this> small section I dont see how it changes <x> to <y> or why that works but when I do <this> it doesnt.

LizR 171 Posting Virtuoso

You might want to head over to the ASP.NET forum for your questions about ASP.NET

LizR 171 Posting Virtuoso

Yes you can remove the line you highlighted, and for the other 2 functions too.

LizR 171 Posting Virtuoso

OK, what else from the string family have you tried?

LizR 171 Posting Virtuoso

Well.. You have to work the logic out, much like the placing on the screen logic..

Write down on paper how you thikn it should work, and at least paste the logic and your attempt at the code here if it doesnt work....

LizR 171 Posting Virtuoso

Probably because slide[numFile] is still null.

LizR 171 Posting Virtuoso

so
Out of the code that was relevant, eg

slides[numFile] = new SLIDELib.Slide();
                    slide[numFile].Width = 125;
                    slide[numFile].Height = 115;
                    slide[numFile].Left = 9 + slide[numFile].Width;
                    slide[numFile].Top = 23 + slide[numFile].Height;

                    slides[numFile].FileName = file.FullName;

The obvious thing is you never added the control to anything, so I bet none are showing up.

LizR 171 Posting Virtuoso

How about you post the code you have, not the ocx, its most likely the issue

LizR 171 Posting Virtuoso

Same as you would for any variable,

int[] i = new int[9];

LizR 171 Posting Virtuoso

by copying it?

LizR 171 Posting Virtuoso

Well as long as you have access to the variable your "about" form was instantiated in, you can do exactly that, you would do about.Show() etc.

LizR 171 Posting Virtuoso

That was helpful of him.

LizR 171 Posting Virtuoso

do you mean to make a new copy of the form, or change to an existing one?

LizR 171 Posting Virtuoso

1. Your statement in your code saying "All variables are made public" is not true.

Your other code doesnt seem to be overly relevant as you have a number of forms defined, but include no detail. You have an empty class of "FixedString".. I cant help you with why things arent working without detail. If the items you try and access are private, then it cant be seen.

if you have 2 forms, for ease of typing Form1 and Form2. You create instances of them.. For you to then access 1 from the other you *can* as long as you can see the variable holding the instance of the other form, use that. If you cant, then its a simple design problem.

2. yes and no. Use of properties is a better standard to adapt and saves changes later, etc, but its not necessarily *bad* but public *is* required for some things, you cant avoid it, if your property is not public, nothing can use it.. public variables persay is just lazy, but if you dont need anything else, its a practical place to start

3. As big as you like pretty much
4. See above, as pretty much as big as you like, however, the more you cram in, the more memory it will use.

LizR 171 Posting Virtuoso

Im speaking from the many years of programming I have.
the problem is you're looking at a class template and wondering why you cant use it without an instance.. which you cant, you're also running into issues of scope.

your code for example

public static void Uruchom()
        {
            Book written = new Book();
            Book bought = new Book();
            written.Author = "Test";
        }

Once you leave that procedure, both bought and written cease to exist. So, you cant use them.

LizR 171 Posting Virtuoso

all classes under a name space can see each other, so, as long as you have made the variable/property under the classes that you need to see from one class to another, public, the other classes can see and use them.

LizR 171 Posting Virtuoso

it probably needs quote marks round it too or it will try and think its a column name

LizR 171 Posting Virtuoso

I dont see any code for where you open your access database?

LizR 171 Posting Virtuoso

What error do you get?

LizR 171 Posting Virtuoso

please use code tags so we can read your code.

LizR 171 Posting Virtuoso

Thats not an array of controls, thats just a bunch of controls with similar name.

You can use the findcomponentbyname so you could then use a for loop (assuming you do have all 1..22)

LizR 171 Posting Virtuoso

*NEVER* make the assumption that a files extension is only 3 characters.

LizR 171 Posting Virtuoso

When you "open" the form, include as part of the calling to open method an update of your combobox items.

LizR 171 Posting Virtuoso

Please mark the thread as solved.

LizR 171 Posting Virtuoso

I guess File.Move(old,new) was too much to look for?

LizR 171 Posting Virtuoso

Have you looked at what you get in the foreach loop?
OK while that code wont work specifically it has a big raving clue in it...

What do you think the clue is?

LizR 171 Posting Virtuoso

You dont.. Its a predefined class in .net - have a check in your helpfile, its clever and tells you what references (if necessary) and what "using" statements you would need

LizR 171 Posting Virtuoso

Have you checked what properties and how to use the dialogbox as per the helpfile? If we hand you all the code you dont learn how to find these things and will end up frustrated as you have to ask for everything and it takes longer.

If you look at the dialogbox in the helpfile, it has examples, it shows how to get the filename and stuff back, then the label component has properties of its own and you can see how to apply them..

Far more pride and joy is got by doing it yourself.

LizR 171 Posting Virtuoso

turbo pascal 7? oh my that goes back a bit.

If you go to options, compiler, bottom right theres a numeric processing section, check the 8087/80287 option.

LizR 171 Posting Virtuoso

yes and no. You can do a dataview to something in memory, such as a list.. I believe even an arraylist.. so.. maybe theres food for thought in that.

The key thing is how your user is going to feel using it. You need to decide which would be easiest to work with to give you what you wanted.

LizR 171 Posting Virtuoso

spss as in ibm mainframe? as far as I recall (was a long time ago) spss will output fixed format text files, which you could then read into c#

LizR 171 Posting Virtuoso

Yep, make your own up, that you can then reuse as your "matrix" input, but it would then allow all that class to do the validation etc.

Wether you stem it from textboxes or a datagrid is kinda down to how you want it to work I guess, in the short term textboxes maybe easier to work with though

LizR 171 Posting Virtuoso

Either would work, but I guess in the long term it depends more on excactly how you're going to process your matrix - of course the perfect answer would be to device a matrix input component, which consists of either of your ideas, but done so you can drop a Matrix onto your form and size and so on.

LizR 171 Posting Virtuoso

Sounds like a config error. Whats in your config file?

LizR 171 Posting Virtuoso

Rapture is right, its not that we hate you or want you to hate us either. However the addage, give a man a fish, he eats for the day, give a man a fishing rod he can eat for a year.

If we give you an a line of code, what did you learn, we will feed you.

If we give you places to look and how to find your answers..
You learn to find them yourself and work faster and smarter.

ddanbe commented: I like eating fish +3
LizR 171 Posting Virtuoso

try group box - even the icon in the toolbox shows it doing what you wanted.

LizR 171 Posting Virtuoso

We dont just hand you the answer because you have demonstrated you dont know how to find out information for yourself, something as simple as this should be something you find in the helpfile - if your question had been more of

Ive got this code, I dont see why its producing <this> when I expected <that> sure, you're likely to see a more informative response, but when the answer is a case of Press F1 for help and read the info you already have to hand, you shouldnt need someone to tell you

LizR 171 Posting Virtuoso

There are quite a few string operations - have a look under "String"

LizR 171 Posting Virtuoso

WJSwan, if you look in your helpfile you will find examples too, it shows how to use other properties of the openfile dialog too.

LizR 171 Posting Virtuoso

Shudda saved your code last time then ... As you've not mentioned any errors etc, Im sure you'll work it out ..

LizR 171 Posting Virtuoso

I guess you didnt download their studio product to test your regex code on..

LizR 171 Posting Virtuoso

Did you add the file in as a resource? And call it the same name etc?

LizR 171 Posting Virtuoso

Errors are always useful...

LizR 171 Posting Virtuoso

But the window *IS* the form, unless you meant desktop.

LizR 171 Posting Virtuoso

only at creation, after that it shouldnt move.. unless theres something else going on?

LizR 171 Posting Virtuoso

You have a huge number of ways to do it.

You could either tackle it as a human would, or, you look though the helpfile and see if theres a prebuilt way to do it.

Either way, get some ideas on paper, try and code it, and then when you have something... We'll help.

LizR 171 Posting Virtuoso

I knew the location would likely be relative, but that didnt sound like the behavior you got. Let alone swapping the show and hide round.

LizR 171 Posting Virtuoso

Logic looks ok to me, my only question is is "_master" always what you think it should be? Im wondering if perhaps instead of overriding the creation it somehow isnt using it so _master ends up null or something and that perhaps this is causing the effect you see